17488 Posts in 4473 Topics by 1978 members
| Go to End | ||
| Author | Topic: | 5152 Views |
-
Re: Multi-level Menu Help

21 July 2008 at 4:06pm
Thanks a ton! I've refined it a little, and will probably continue to as I figure more things out with it, but that got it working about 98% as I wanted.
-
Re: Multi-level Menu Help

19 October 2008 at 10:36am
For some reason I just don't understand how these menu's derive. For example, I am using the Nature4web template to learn from and they have the following code:
<h3>Navigate</h3>
<ul id="Navigation">
<% control Menu(1) %>
<li>
<a class="$LinkingMode" href="$Link" title="Go to the $Title.XML page">$MenuTitle<span></span></a>
<% if Children %>
<% if LinkingMode = section %>
<ul id="Sub-Menu">
<% control Children %>
<li class="$LinkingMode<% if FirstLast %> $FirstLast<% end_if %>">
<% if LinkingMode = current %>
<a class="items" href="$Link" title="Go to the $Title.XML page">$MenuTitle</a>
<% else %>
<a class="item" href="$Link" title="Go to the $Title.XML page">$MenuTitle</a>
<% end_if %>
</li>
<% end_control %>
</ul>
<% end_if %>
<% if LinkingMode = current %>
<ul id="Sub-Menu">
<% control Children %>
<li class="$LinkingMode<% if FirstLast %> $FirstLast<% end_if %>">
<% if LinkingMode = current %>
<a class="items" href="$Link" title="Go to the $Title.XML page">$MenuTitle</a>
<% else %>
<a class="item" href="$Link" title="Go to the $Title.XML page">$MenuTitle</a><% end_if %>
</li>
<% end_control %>
</ul>
<% end_if %>
<% end_if %>
</li>
<% end_control %>
</ul>what I want to achieve is a third level menu which I would assume includes a block like:
<% if Children %>
<% control Children %>
<a class="item" href="$Link" title="Go to the $Title.XML page">$MenuTitle</a>
<% end_control %>
<% end_if %>Does anyone know what I am doing wrong?
The menu nav should appear as follows:
Home
Section
Sub-Pagebut the sub-page never renders or when I've gotten it to partially work, it shows up at Section level instead of Sub-page level...
thanks for anyone's help in advance!
-
Re: Multi-level Menu Help

19 October 2008 at 3:44pm
Its because you have that wrapped inside a <% if LinkingMode = current %> . this will only return true if you are on the section page. You need to change that to if LinkOrSection = section which will return true if you are on that page (eg the main section page) or a child of the section page
| 5152 Views | ||
| Go to Top |


