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>
|
<aside>
|
||||||
<% if $Menu(2) %>
|
<% if $Menu(2) %>
|
||||||
<nav class="secondary">
|
<nav class="secondary">
|
||||||
|
<% with $Level(1) %>
|
||||||
<h3>
|
<h3>
|
||||||
<% loop $Level(1) %>
|
|
||||||
$Title
|
$Title
|
||||||
<% end_loop %>
|
|
||||||
</h3>
|
</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<% loop $Menu(1) %>
|
|
||||||
<% include SidebarMenu %>
|
<% include SidebarMenu %>
|
||||||
<% end_loop %>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
<% end_with %>
|
||||||
</nav>
|
</nav>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
</aside>
|
</aside>
|
||||||
|
Loading…
Reference in New Issue
Block a user