I am trying to add the class cm-active onto a menu item on the side category menu when the user is on the page for that category. It appears the code is not dynamic it is only cached so each time i clear my cache the code works the first time but afterwards its stuck on the first category selected.
Example: If I goto http://cs.solesu.com and click Belts. Belts will be “red” but if i click bags belts
stays red unless i clear cache from admin. is there any way to fix this?
I only added two things {assign var=“foreach_name” value=“cats_$cid”}
and {if $category.category_id == $cc_id} to the below original menu_items.tpl code.
```php
{* $Id: menu_items.tpl 9353 2010-05-04 06:10:09Z klerik $ *}
{strip}
{assign var=“cc_id” value=$smarty.request.category_id}
{assign var=“foreach_name” value=“cats_$cid”}
{if $category.subcategories}
{include file="views/categories/components/menu_items.tpl" items=$category.subcategories separated=true submenu=true cid=$category.category_id}
{/if}{*$smarty.session.current_category_id*}
{$category.category}
{if $separated && !$smarty.foreach.$foreach_name.last}
{/if}
{/foreach}
{/strip}
```