Active tab for top menu

Hey,



Not sure if this solution already exists but any ideas how to active a tab per category? i know it can be done for most things and even pages but seems this does not work:



categories.view&category_id=1

I’m also looking for a solution for this. I tried a couple different variations:



categories.category_id=1

categories.view&category_id=1

categories.view.category_id=1



…but nothing seems to work.



Anyone have any ideas?

maybe it needs the complete url

Nope complete url doesn’t do it but thanks for the tip.



I’ve got a ticket in with support so hopefully I’ll get a definitive answer back and will post it here when i do.

Did anybody manage this as I’m also looking to do the same

Well, I sorta have it working.



I initially had a category in each tab. However, but I couldn’t fit every category in. So I ended up with two tabs.



ink cartridges & photo paper





Here it is on my website:



www.inkWOW.com



It sorta working I guess. Just leave the “Activate menu tab for:” blank.

hykit is right, just leave “Activate menu tab for:” blank and whatever you are using for URL will be the page that makes the tab active.

[quote name=‘jonahcoyote’]hykit is right, just leave “Activate menu tab for:” blank and whatever you are using for URL will be the page that makes the tab active.[/QUOTE]



MM I must be missing something then as I’ve just tried that and it doesnt seem to do anything.

Well it only adds the class “cm-active” so you have to have styling setup for this class in your stylesheet. Don’t know if there is by default.

[quote name=‘jonahcoyote’]Well it only adds the class “cm-active” so you have to have styling setup for this class in your stylesheet. Don’t know if there is by default.[/QUOTE]



Yeah it’s currently already working for the homepage.



But I’ve created links to different categories in the top menu but activate the “cm-active” styling for these.

I’ve got my top menu setup with only categories and it works for me. Again, it only applies the “cm-active” class to those tabs when you are on any of the categories (and not sub-categories) so you need to create an alternate style for anything to appear different.

Hello, I’m struggling to get these top menus activate…



Any suggestions before I hard code them :frowning:

Have you tried contacting support?

[quote name=‘jonahcoyote’]Have you tried contacting support?[/QUOTE]



Yeah no answer been waiting two day…

Modify the top menu template:





  • So your current category tab is active.

    This is what I did with the categories emenu block.

    Might be a little more involved with the top menu.
  • Okay, here’s my implementation. Active menu selected by on the current category id.



    Check it out at:



    http://www.inkwow.com



    Buttons have rounded corners only on browsers based on Mozilla and WebKit since those support CSS3 well. IE does not.







    Inspired by the horizontal menu from baballuci.



    [url]http://forum.cs-cart.com/showthread.php?t=11324[/url]

    ```php {if $category.category_id == $smarty.session.current_category_id} ```



    Does anyone know what the equivalent smarty tag is for the top_quick_links.tpl? I’d like to show ON state for this menu.



    thanks,

    Glen

    As usual, I figure it out immediately after posting…



    ```php {if $config.current_url == $link.param} ```

    {if $config.current_url == $link.param}



    is this how to show current url?

    [quote name=‘vidan’]{if $config.current_url == $link.param}



    is this how to show current url?[/QUOTE]



    That code lets me set an ON state in the Quick Links menu. Like this:



    ```php {foreach from=$quick_links item=“link”}

    {if $config.current_url == $link.param}



  • {$link.descr}



  • {else}



  • {$link.descr}



  • {/if}

    {/foreach} ```



    If you just want to display the current URL, you can do this

    ```php {$config.current_url} ```