[Solved] Footer_menu

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
jasnick
Power Poster
Power Poster
Posts: 695
Joined: Sat Jan 15, 2011 8:36 am

[Solved] Footer_menu

Post 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
Last edited by jasnick on Wed Jun 08, 2011 1:37 am, edited 1 time in total.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1803
Joined: Wed Feb 25, 2009 4:25 am

Re: Footer_menu

Post 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})
jasnick
Power Poster
Power Poster
Posts: 695
Joined: Sat Jan 15, 2011 8:36 am

Re: Footer_menu

Post 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!
Post Reply

Return to “CMSMS Core”