mwgsr Posted August 31, 2005 Posted August 31, 2005 Hi, For the category infobox I want my Main Category Links to display a different color then my subcategory Links. Can any one help me out real quick on this one. Thanks, Mike. :thumbsup:
Guest Posted August 31, 2005 Posted August 31, 2005 Open catalog\includes\boxes.php and find function tep_show_category() Now for each entry there is a link that is generated with <a href= ......</a> tags. Setup a couple of classes in your .css file for the colors you need then insert the class="mynewcolor1" in the <a> tag after the link is instantiated. ie this line $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">'; will become $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '" class="mynewcolor1">'; and finally place some code to check for the category_id. If its 0 use class with color1 else color2.
mwgsr Posted August 31, 2005 Author Posted August 31, 2005 yah i know how to setup the class but the check is what is confusing me.
Guest Posted August 31, 2005 Posted August 31, 2005 see the $tree[$counter]['level'] array in that function. When its value is 0 is a top category therefore you deploy color1 else color2.
mwgsr Posted August 31, 2005 Author Posted August 31, 2005 Got it, thanks. Just incase anyone else needs to know how to do it: //Added for color mod if($tree[$counter]['level'] == '0') { //Top cat $cat_class = 'mainCat'; } else { //Sub cat $cat_class = 'subCat'; } :thumbsup:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.