Currently my side menu does not have a class identifying its active state (or any other for that matter). What template do I edit so that the side navigation menu has a class identifying its active state? Thank you.
Depending on what “Appearance” you select for your categories block, assuming you mean the category nav menu, you may want to check the template files customer/blocks/category_[something].tpl (e.g. category_plain.tpl or category_emenu.tpl).
Those templates include code from one of the templates in customer/views/category/components/ which is where you’ll see the actual
- code. Some appearance options already set the “active” class.
Hope that helps.
I set the appearance to “Plain” and tracked down “menu-root-categories” to views/categories/components/categories_tree.tpl
[STRIKE][COLOR=“Wheat”]I added code after the LI (ie
While I selected the appearance of “Plain” under the “All Pages” tab, it did not apply to the “Home Page”, so I made the same appearance change to the “Home Page” tab.
The UL is this one:
Now… how do I add a conditional that will add a style class to the LI if the menu is currently “active”?
Here’s the code:
{foreach from=$categories item=category key=cat_key name="categories"}
{if $category.level == "0"}
{if $ul_subcategories == "started"}
{assign var="ul_subcategories" value=""}
{/if}
{else}
{if $ul_subcategories != "started"}
{/if}
{/foreach}
Sorry, Is there a cache setting in CS-Cart? My changes are not reflected on the website.