Thanks, that made the difference. Is it possible to have the subcategories act the same way as the topcategories (down-arrow) when selected using a seperate 'category-subs-parent' class?
Printable View
Thanks, that made the difference. Is it possible to have the subcategories act the same way as the topcategories (down-arrow) when selected using a seperate 'category-subs-parent' class?
Any (sub)category situation that is distinguished by a different class name can be addressed in the stylesheet with its own marker, background, hover, etc.
If it doesn't have a distinguishing class, it should be possible to customize the code somewhere in tpl_categories.php to make a class. The specifics would depend on exactly what was wanted.
Hello. I was hoping you could help. I have installed your mod and have figured out the minimal additions but am having trouble understanding how to do the following.
I want to have my main categories have images but keep the sub categories as links. How do I do this?
Beth-katherine
Categories Dressing will only display an image for a category where it finds an image file. If you do not load images for your subcats, you will get the standard text links for them. If you need more help, post a link to your site.
And congrats on your 100th post :)
Hi, I have uploaded the files necessary and have individual buttons for each of my categories with the text already placed on that particular image. But with so many options I am now confused on what parts to edit to make my buttons to look like the following:
http://www.frommyheartprimitives.com...plebuttons.gif
Any help will be greatly appreciated. Thank you
You have complete images for each of these categories, so you will want to use this section of the codewhich means naming your image files catimg23.gif, catimg24.gif, etc. (whatever your cPaths are). Name your images and load them as the readme instructs, and they will show up in place of the standard text.PHP Code:
// categories dressing - display image if exists for category name
if (file_exists(DIR_WS_TEMPLATE_IMAGES . 'catimg' . $current_path . '.gif')) {
$cat_name_display = zen_image(DIR_WS_TEMPLATE_IMAGES . 'catimg' . $current_path . '.gif');
If you want to do hover effects, you would name your images catbg23.gif, catbg24.gif, etc. and add to your stylesheet like this:Code:
/*example for individual category as bg image*/
a.catBg25 {
background-image: url(../images/catbg25.gif);
height: 30px;
}
a.catBg25:hover {
background-image: url(../images/catbg25hover.gif);
}
Thank you very much, it was much simpler than I thought, now if I can get rid of the blue border I will be in good shape. I do appreciate your help! Saved me hours of manually adding each category to the button!
"Blue border"...
That sounds like the default browser behavior (putting a border around image links), which Zen Cart's standard stylesheet disables. You may have eliminated something in the stylesheet that would have been better left alone. With a link to your site, I could probably identify the problem and fix it.
Its still in the works... but appreciate your assistance greatly!
http://www.frommyheartprimitives.com/shop/
A stock stylesheet has
a img {border: none; }
right below the body declaration. You don't have "a img" declared anywhere.
Adding this will fix that problem (tested on your site).