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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Template Questions /

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

Showing Deep Subpages on Sidebar?


Go to End


5 Posts   1555 Views

Avatar
ginger

Community Member, 9 Posts

25 August 2009 at 6:44am

My subpages go 4 pages deep. The sidebar in Blackcandy only shows three levels. Can I modify the sidebar.ss template to show the fourth level in the sidebar? I've searched the forums but couldn't find the answer.

Avatar
ginger

Community Member, 9 Posts

25 August 2009 at 7:19am

I just want to clarify: I have the first level in the tabs at the top and then I want to show three sub-levels in the sidebar. Here's my sidebar code as it stands now:

<div id="Sidebar" class="typography">
<div class="sidebarBox">
<h3>
<% control Level(1) %>
$Title
<% end_control %>
</h3>

<ul id="Menu2">
<% control Menu(2) %>
<% if Children %>
<li class="$LinkingMode"><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode levela"><span> <em>$MenuTitle.XML</em></span></a>
<% else %>
<li><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode levela"><span><em>$MenuTitle.XML</em></span></a>
<% end_if %>

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

<% end_control %>

</ul>
</li>
</ul>

<% end_if %>

<% end_if %>
</li>
<% end_control %>
</ul>
<div class="clear"></div>
</div>
<div class="sidebarBottom"></div>
</div>

Avatar
ginger

Community Member, 9 Posts

26 August 2009 at 6:50pm

anyone?

Avatar
butch

Community Member, 1 Post

16 April 2010 at 3:09am

A solution would be awesome... :(

Avatar
Juanitou

Community Member, 323 Posts

16 April 2010 at 4:03am

Have you tried simply adding another <% if Children %><% control Children %> .levelc block? The code is hard to read…