Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Add Top and Footer Navigation Menu

Go to End

4 Posts   2761 Views


Community Member, 46 Posts

10 November 2010 at 12:24am


I would like to have a footer and top navigation that is independent from the normal navigation menu.

I came up with a solution that is not really satisfying. My solution was to add a page, that is not in the menu and then add pages under it like this:

- TopNavigation (not in menu)
- Page 1
- Page 2

and then in the template:

<% control ChildrenOf(TopNav) %>
<li><a href="$Link" title="$Title">$MenuTitle</a></li>
<% end_control %>

But clicking on the link it has /topNav/ or /FooterNav always in it. I would like to only have /page1 /page2

What would be the correct solution to this? I think more people have more than one menu on their page...

Kind regards


Community Member, 59 Posts

10 November 2010 at 2:14am

you can use recipe here

you just create checkbox in admin panel that will decide if the page will be shown in menu (you should create two)

static $db = array(
"ShowInTabMenu" => "Boolean"

function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Behaviour", new CheckboxField("ShowInTabMenu", "Show special menu "));
return $fields;

then in page controller create functions, you shuold create two function e.g. headerMenu() nad footerMenu()

function topTabbers() {
$whereStatement = "ShowInTabMenu = 1 AND ShowInMenus = 1";
return DataObject::get("Page", $whereStatement);

then jus use $headerMenu or $footerMenu


Community Member, 46 Posts

10 November 2010 at 4:21am


that worked and was excactly what I wanted ;-)



Community Member, 70 Posts

17 November 2012 at 3:07am


I've created a module to deal with footer links, though I guess there is no reason why it could not be applied to header links also. Details can be found at


Gordon [Anderson]