Hi,
I am transferring an existing static corporate website to Silverstripe. On the homepage the navigation has a group of second level navigation items open while their are other second level nav items which you can't see until you click on the top level link.
I want to be able to replicate this in SilverStripe and was thinking the best way to do it would be with in IF statement in the template as so:
<% if Children %>
<% if URLSegment="industry-practice">
<li class="$URLSegment"><a href="$Link" title="{$Title}" class="$LinkingMode">$MenuTitle</a>
<ul>
<% control Children %>
<li class="$LinkingMode"><a href="$Link" title="{$Title}" class="$LinkingMode">$MenuTitle</a></li>
<% end_control %>
</ul>
</li>
<% else %>
<li class="$LinkingMode"><a href="$Link" title="{$Title}" class="$LinkingMode">$MenuTitle</a></li>
<% end_if %>
<% else %>
<li class="$LinkingMode"><a href="$Link" title="{$Title}" class="$LinkingMode">$MenuTitle</a></li>
<% end_if %>
Anyway this doesn't work but is it possible to do something like <% if URLSegment="industry-practice"> ? Otherwise is their an easier way to selectively display a second level menu item based on a class?