Page 1 of 1

[Solved] Footer_menu

Posted: Tue Jun 07, 2011 7:57 am
by jasnick
Using CMSMS 1.9.4.2

Am using a Menu Manager/footer_menu template:

{foreach from=$nodelist item=node}
<a href="{$node->url}">{$node->menutext}</a> |
{/foreach}

How do I get it to exclude certain pages such as a results page from the Search module?

Do I have to set any particular settings on the Search Results page - for example, what is its "content type"?

Thanks

Re: Footer_menu

Posted: Tue Jun 07, 2011 1:51 pm
by DIGI3
In the Options tab of the page editor, there's a "show in menu" checkbox. Unchecking this will remove it from all menus.

If you just want to exclude a page from a particular menu, there's quite a few different ways of doing it. One would be to use an {if} statement in menumanager, like {if $node->alias ne "foo"}<a href="{$node->url}">{$node->menutext}</a>{/if}

Unrelated, you can also do this to generate the | between the menu items and not have it show up at the end:
{if $smarty.foreach.foobar.last}{else}|{/if}
(where foobar is the "name" parameter from the foreach, e.g. {foreach from=$nodelist item=node name=foobar})

Re: Footer_menu

Posted: Wed Jun 08, 2011 1:36 am
by jasnick
Thanks DIG13

Just what I needed to know.

Also the info about not having the last "|" show in the menu - thanks for that - I have been meaning to check that out!