Fix for menu showing all sub-pages instead of children only

Original version used <% loop $menu(1) %> which loops through all top level pages.

This version uses <% with $Level(1) %> to reference the current top level page only.
This commit is contained in:
Bruce Bowden 2012-12-30 20:08:12 +11:00
parent 5779d770dc
commit c8e1253d79
1 changed files with 2 additions and 4 deletions

View File

@ -1,16 +1,14 @@
<aside>
<% if $Menu(2) %>
<nav class="secondary">
<% with $Level(1) %>
<h3>
<% loop $Level(1) %>
$Title
<% end_loop %>
</h3>
<ul>
<% loop $Menu(1) %>
<% include SidebarMenu %>
<% end_loop %>
</ul>
<% end_with %>
</nav>
<% end_if %>
</aside>