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.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

Themes-nesting menus


Go to End
Reply


3 Posts   1590 Views

Avatar
StillLearning

Community Member, 12 Posts

8 January 2009 at 10:27pm

I have tried a few of the themes but cannot find any that seem to support sub pages of sub pages that show on the top level menus. I know I can do it with coding.... but I am in a hurry and wonder if is built in an i am missing it?

Avatar
mccarville

Community Member, 32 Posts

17 January 2009 at 11:43am

Edited: 17/01/2009 11:44am

You want your sidebar.ss(typical name) file in themes\Theme_Name\templates\Includes\ to look something like this:

<% control Level(1) %>

<% if Children %>
<a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode test">$Title</a>

<ul class="sidemenu">
<% control Children %>
<li><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode">$MenuTitle</a>

<!--Level 2 of the Menu -->

<% if LinkOrSection = section %>
<ul class="sidemenu">
<% control Children %>
<li><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode">$MenuTitle</a>

<!-- Level 3 of the Menu -->

<% if LinkOrSection = section %>
<ul class="sidemenu">
<% control Children %>
<li><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode">$MenuTitle</a></li>
<% end_control %>
</ul>
<% end_if %>

</li>
<% end_control %>
</ul>
<% end_if %>
</li>
<% end_control %>
</ul>

<% end_if %>
<% end_control %>

Avatar
LinseyM

Community Member, 99 Posts

5 July 2009 at 4:27am

Just stumbled upon this post in the forum while trying to do the very same thing on my site!

Thanks very much mccarville - works like a charm!

;)