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, biapar, Willr, Ingo, swaiba, simon_w

Question About Sibling Menus


Reply


2 Posts   1379 Views

Avatar
Sophie

Community Member, 33 Posts

15 August 2009 at 2:05am

Edited: 15/08/2009 2:07am

I've been using the following menu control to show sibling pages in the side bar of my third level pages.

               <% control Menu(3) %>   
               <li><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode<% if First %> top<% end_if %>"><span>$MenuTitle</span></a></li>
               <% end_control %>            

What I want to know is if there is a way to show all sibling pages in the sidebar, regardless of the level - so regardless of how deep in the site, the sibling pages will always show in the sidebar?

Thanks!

Sophie

Avatar
Bruce B

Community Member, 147 Posts

15 August 2009 at 7:52pm

Dunno if this would work but how about:

<% control Parent %>
<% control Children %>
Links go here

<% end_control %>
<% end_control %>

cheers
bruce