Re: ALWAYS display first level subcats beneath root cats
Hey this is a really interesting thread for me. I have just begun to seriously edit and create new templates for an X-Cart Gold 4.15 store. The goal is to produce it with table-less xhtml/css and have it produce valid markup.
I've taken the latest code from dalmuti and simplified it slightly so that it outputs the categories and subcategories as an unordered list (I'll post it once it's done). I just have a couple of questions first.
1) I would like to highlight the category that is currently in view. I have a css class that I can use called "current" to do this; <li class="current">some-category</li>. I'm just not sure how to write the conditional statement. Is there a resource I can use to look this stuff up in.
2) I would also like to keep the sub-categories of a current category in view while browsing around that sub-category. Is the code that chris2002 posted the best/only way to do this.
Thanks a lot.
Andrew
__________________
X-Cart Gold Version 4.15
PHP 5.16 / MySQL 5.022
Apache 2.2.3 / Linux (Fedora Core 6)
|