Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » A way to make the navigation

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

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

Page: 1
Go to End
Author Topic: 1565 Views
  • Synaps1s
    Avatar
    8 Posts

    A way to make the navigation Link to this post

    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 %>
    </div>

    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.

  • Synaps1s
    Avatar
    8 Posts

    Re: A way to make the navigation Link to this post

    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..

  • Sigurd
    Avatar
    Forum Moderator
    628 Posts

    Re: A way to make the navigation Link to this post

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

    Or

    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 %>
    </ul>

    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.

    1565 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.