mirror of
https://github.com/silverstripe/silverstripe-simple
synced 2024-10-22 11:05:50 +02:00
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:
parent
5779d770dc
commit
c8e1253d79
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user