Jump to:

3444 Posts in 1030 Topics by 871 members

Template Questions

SilverStripe Forums » Template Questions » [SOLVED] limit menu in subpages

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

Page: 1
Go to End
Author Topic: 1050 Views
  • alienn
    Avatar
    Community Member
    15 Posts

    [SOLVED] limit menu in subpages Link to this post

    hey

    i'll have page structure sth like that :

    TOP
    A | B
    A1 | A2 | B1 | B2
    A11 | A12 | A21 | A22 | B11 | B12 | B21 | B22

    how do i limit menu links to A and B on TOP
    A1 A2 on A
    B1 B2 on B
    A11 A12 on A1
    etc..

    all of this withoutall other links (including higher level)

    is there a simple way to do this ?
    Thanks in advance

  • 3dgoo
    Avatar
    Community Member
    133 Posts

    Re: [SOLVED] limit menu in subpages Link to this post

    So on any given page, you don't want any links to come up except the direct children?

    If thats right then:

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

  • alienn
    Avatar
    Community Member
    15 Posts

    Re: [SOLVED] limit menu in subpages Link to this post

    that's exactly what i wanted, thanks for help

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