A more robust way of doing image substitution would be to change the tpl_categories.php code to do an image file lookup/substitution with the same function the categories use.
As an example, for the specials link, change this
PHP Code:
if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
$cat_box_link_head = cat_box_heading('SPECIALS');
$content .= $cat_box_link_head[1];
$show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= 1 limit 1");
if ($show_this->RecordCount() > 0) {
$content .= '<li><a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '</li>' . "\n";
}
}
to this
PHP Code:
if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
$cat_box_link_head = cat_box_heading('SPECIALS');
$content .= $cat_box_link_head[1];
$show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= 1 limit 1");
if ($show_this->RecordCount() > 0) {
//test 20100124
$link_name_display = cat_name_display(CATEGORIES_BOX_HEADING_SPECIALS, 'specials')
$content .= '<li><a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . $link_name_display[1] . '</a>' . '</li>' . "\n";
// /test 20100124
}
}
Not tested yet, but this should use the image at
/includes/templates/your_template/buttons/english/catimgspecials.gif
including (with the new v2.8 code) automatically adjusting the image type to whatever is globally set in categories_dressing_defines.php, or using the standard text if the image is not found.
Applying this change to the rest of the links will be straightforward.
Bookmarks