17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1509 Views |
-
Create Navigation Menu Based on Current Page

25 November 2008 at 6:18am Last edited: 25 November 2008 6:23am
I am trying to isolate only the current page and it's children, showing the links on the left side.
For some reason, I am getting a complete list of links for all pages and their children.
Here are the pages in the backend:
Homepage
About
Product
Widget1
Details
Specifications
Overview
Widget2
Details
Specifications
Overview
Widget3
Sitemap
Here is an example of what I want to show up when I am on Widget1's page:Widget1
Details
Specifications
OverviewWhat would I need to do to get it to display that way? I am using the current:
<ul>
<% control Menu(1) %>
<% if LinkorSection = section %>
<% if Children %>
<% control Children %>
<h2><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode"<% if is_a(RedirectorPage) %> target="_blank" <% end_if %>><span>$MenuTitle</span></a></h2>
<% end_control %>
<% end_if %>
<% end_if %>
<% end_control %>
</ul>Thanks for anyone's help on this!
-
Re: Create Navigation Menu Based on Current Page

25 November 2008 at 7:18am
try changing it from "Menu(1)" to "Menu(2)", and keep everything else the same.
-
Re: Create Navigation Menu Based on Current Page

25 November 2008 at 7:44am
Thanks Grilldan!
I actually tried something else that seemed to work:
<ul>
<% control Level(2) %>
<li><h2><a class="$LinkingMode" href="$Link" title="Go to the $Title.XML page"><span>$MenuTitle</span></a></h2>
<% if Children %>
<ul>
<% control Children %>
<li><a class="button" style="text-decoration:none;" onclick="this.blur();" href="$Link" title="Go to the $Title.XML page"><span>$MenuTitle</span></a></li>
<% end_control %>
<% end_if %>
<% end_control %>
</ul>
</ul>Thanks though, every time I see a different way of putting navigational item logic together, the more it makes sense...
| 1509 Views | ||
|
Page:
1
|
Go to Top |


