top_menu.tpl mod or additional top_menu ?

$top_menu$top_menu$top_menu$top_menuI need to add an additional Menu to the website.



There is already 2 menu available: top_quick_links.tpl and, top_menu.tpl So the proper way would be to make a third file.

But

  1. I've no idea how to enable this in the admin
  2. it implies seting new table in the db => probably not friendly for updates etc…





    So I thought that they might be a other way to do the job by using the top_menu

    and giving different css class to item 1 to n of the menu and item n+1 to last



    now it does not work… the " if $top_menu <= 4" does not trigger ( do you know why ?




```php


{strip}

    {foreach from=$top_menu item="m"}
    {if $top_menu <= 4}

  • {$m.item}
    {/if}

  • {$m.item}
    {if $m.subitems}
    {include file="top_menu.tpl" items=$m.subitems top_menu="" dir=$m.param_4}
    {/if}

  • {/foreach}

{/strip}

```

Seems difficult to get help around here, anyhow I did get help elsewhere so I'll share it:




```php

{* $Id$ mini menu }

{
modif to display only first 3 menu item *}


{strip}

    {foreach from=$top_menu item="m" name='foo'}
    {if $smarty.foreach.foo.iteration le 3}

  • {$m.item}


  • {/if}
    {/foreach}

{/strip}

```

Might remember that this is 1 week before Christmas and that some people either have lives or don't know the answer to your question off the top of one's head. If you're wanting people to research stuff for you and consult with you then you might want to consider hiring those services. Thank you for sharing your solution.