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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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

Question About Sibling Menus


Go to End


2 Posts   1806 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, 164 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