HI all,
I'm getting there slowly, but really slowly. I'm begging to understand templates and sitetree a little more. I'm am having major trouble with setting up a permanent sub menu, a question I see a few others asking with a few different solutions.
I've got ye old main menu running horizontally along the header. And a sub menu running down the side with all the children of home to appear on all pages. So far so good. Now I'm having trouble identifying the current active menu to then display a third level menu. The boolean isCrruent gives me errors :( can you even use this in an <% if isCrruent %> statement?
the code
<ul id="nav">
<% control Menu(2) %>
<% if Children %>
<li id="nav"><div><a href="$Link" title="Go to the $Title.XML page">$MenuTitle</a></div>
<ul>
<% control Children %>
<li><a href="$Link" title="Go to the $Title.XML page">$MenuTitle</a></li>
<% end_control %>
</ul>
</li>
<% else %>
<li id="nav"><div><a href="$Link" title="Go to the $Title.XML page">$MenuTitle</a></div></li>
<% end_if %>
<% end_control %>
</ul>
I was trying to do the following but my noobness got me stumped
<ul id="nav">
<% control Menu(2) %>
<% if Children %>
<% if isCurrent %>
<li id="nav"><div><a href="$Link" title="Go to the $Title.XML page">$MenuTitle</a></div>
<ul>
<% control Children %>
<li><a href="$Link" title="Go to the $Title.XML page">$MenuTitle</a></li>
<% end_control %>
</ul>
</li>
<% end_if %>
<% else %>
<li id="nav"><div><a href="$Link" title="Go to the $Title.XML page">$MenuTitle</a></div></li>
<% end_if %>
<% end_control %>
</ul>
Any ideas? I've been working on this for an embarrassing long amount of time. I was originally trying use the sitemap() function form the tutorial. Then realised the default controls should be capable of managing this.