So I have the basic menu set up:
---------
-Active Page
-Page
-Page
-Page
---------
I'm wanting to get something along the lines of this:
---------
-Active page
-Sub-page
-Sub-Page
-Page
-Page
-Sub-Page (hidden in menu)
-Sub-Page (hidden in menu)
---------
I came across this:
<% if Menu(2) %>
<h2><% control Level(1) %>$Title<% end_control %></h2>
<div class="list">
<ul>
<% 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>
<!-- list -->
<p> </p>
<% end_if %>
But try as I might I just can't get it working. Perhaps I'm putting it in the wrong place? Maybe some of those 2s should be 1s? As a SilverStripe newbie, I'm just not sure. Any help would be appreciated.