Category Menu Active Category?

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}
    ```

    Hi,



    I have the same issue on my shop. :(



    Here is a list of some short explanations: {$smarty} reserved variable | Smarty



    In cs-cart the $smarty.env variable is disabled. From what I saw that was a good option for our use.

    I fount it.



    in config.local.php you must set to true the block caching



    'disable_block_cache' => true



    Now, the top menu its working great.

    [quote name='robert_p' timestamp='1315403123' post='121153']

    I fount it.



    in config.local.php you must set to true the block caching



    'disable_block_cache' => true



    Now, the top menu its working great.

    [/quote]





    two questions. what is your website and did disabling block cache cause any performance issues for you?

    well, the shop is stil under development; probably will be ready in 1 week or so.

    untll now, i dind't notice something unusual {and i have added around 800 products}



    if there will be a strange behaviour, i will switch back to enable caching blocks. i am thinking also, if there will be a way to disable a cache block only for a specific block (like emenu, in my case)



    but you, did you find another way to manage this?