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.


  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 ?

<br />
<div id="top_menu"><br />
{strip}<br />
<ul class="top-menu dropdown"><br />
{foreach from=$top_menu item="m"}<br />
{if  $top_menu  <= 4}<br />
<li class="menu1"><br />
  <span><a{if $m.href} href="{$m.href|fn_url}"{/if}{if $m.new_window} target="_blank"{/if}>{$m.item}</a></span><br />
{/if}<br />
<li class="menu2 {if $m.selected == true}cm-active{/if}"><br />
  <span><a{if $m.href} href="{$m.href|fn_url}"{/if}{if $m.new_window} target="_blank"{/if}>{$m.item}</a></span><br />
  {if $m.subitems}<br />
   {include file="top_menu.tpl" items=$m.subitems top_menu="" dir=$m.param_4}<br />
  {/if}<br />
</li><br />
{/foreach}<br />
</ul><br />
{/strip}<br />
</div><br />

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


{* $Id$ mini menu }

modif to display only first 3 menu item *}


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

  • {$m.item}

  • {/if}



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.