Zen Follower
- Join Date:
- Feb 2009
- Location:
- Simi Valley, CA
- Posts:
- 99
- Plugin Contributions:
- 0
Images next to mouse over links in Categories sidebox
Hi fellow zenners,
I've been struggling on trying to figure out how to get a small image to appear next to a category link in the sidebox when I hover over it.
Here's the link to the main site! https://www.vapur.us
Here's the link to the shopping cart. https://www.vapur.us/shop
(a trend that has unfortunately continued where the site was built first)
Here's where I'm at:
includes/templates/MY_TEMPLATE/sideboxes/tpl_categories.php
(I copied the template_default file to my template).
I uploaded my small image to MY_TEMPLATE/images/water.jpg
...warning - PHP primate trying to do something here...:blink:
I don't know how or where to insert this:
<img src="images/water.jpg">
somewhere in here:
if ($box_categories_array[$i]['current']) {
if ($box_categories_array[$i]['has_sub_cat']) {
$content .= '<span class="category-subs-parent">' . $box_categories_array[$i]['name'] . '</span>';
} else {
$content .= '<span class="category-subs-selected">' . $box_categories_array[$i]['name'] . '</span>';
}
} else {
$content .= $box_categories_array[$i]['name'];
}
if ($box_categories_array[$i]['has_sub_cat']) {
$content .= CATEGORIES_SEPARATOR;
}
$content .= '</a>';
if (SHOW_COUNTS == 'true') {
if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
$content .= CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
}
}
$content .= '' . "\n";
}
}
I don't want to use an image background because it would then be in a generic position. I want the image to be "right next to" the category link no matter the length of the name.
Thank you so much!!!!!
Michelle