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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

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

A way to make the navigation

Go to End

3 Posts   1851 Views


8 Posts

19 October 2007 at 12:14am

Hello, i asked once before, but don't get any answer, so i will try once again,
my Navigation is generated by:

<div id="navihaupt"><% control Menu(1) %>
<a href="$Link" target="_parent"><img src="fog/images/{$MenuTitle}.gif" alt="$MenuTitle" /></a><br><% end_control %>

The Problem is, it generates all the links, but i want to have 2 navigations, where 4 last links are kept in the footer, i know i could make this static without using the <% control but that's not what i want. Can someone pinpoint me how to generate the navigation proper?

All the links are on the 1st Level, and i want to have some of them sitting in my footer: impressum, contact, links, blabla.

What i dont know is how to exclude this links from being generated with the code above.

thanks in advance.


8 Posts

19 October 2007 at 3:50am

Can't no one help me out with that?

Can I add some "flags" or whatever to the Pages i want to be in the footer and then make an <% if statment?

I don't have an Clue after reading the Build-in-page-Controls reference the only idea that popped up in my head was to make either an IF statment and that leaves last 4 pages out, or make an virtual page and then paste the other pages as subpages into it, then refer to them with level2, but this is an crappy solution (i think)

I hope somebody can understand my perfect english :)

C'mon guys, im not a php guru ;-] just an designer who wants an cms up and running..


Forum Moderator, 628 Posts

25 October 2007 at 6:39am

Edited: 25/10/2007 6:41am

An easy way to make a page called 'footer navigation'. Make the children of that page the items your list at the bottom.


make a tickbox on your pages, to the effect of 'show only in footer'. If you were to call it OnlyOnFooterMenu

then use an <% if OnlyOnFooterMenu %> construct.

 <ul id="Menu1">
    <% control Menu(1) %>
      <% if OnlyOnFooterMenu %>

        <li class="$LinkingMode"><a href="$Link" title="Go to the &quot;{$Title}&quot; page">$MenuTitle</a></li>
       <% end_if %>
    <% end_control %>

the "if" construct is introduced in tutorial one...

By the way, your menu options below won't change when they are clicked on. You should use class="$LinkingMode" (or <img src="fog/images/{$MenuTitle}_{$LinkingMode}.gif") to ensure good usability of your site. Again, refer to tutorial one.