Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Displaying all children links except current?

Go to End

3 Posts   1624 Views


Community Member, 11 Posts

24 February 2011 at 11:24am

Hello all!.
I have a multi level navigation site. what I am trying to do is to show a "Also in this section" menu below my current content. So far I have managed to do this by using the following code:

	<h1>Also in $Level(1).Title</h1>

  <ul><% control Menu(2) %>

<li><a class="navigation"  href="$Link" title=" Go to $Title.XML">$MenuTitle</a></li>

  <% end_control %></ul>
<% end_if %>

However, this code displays a list of all children, but I want my current page to be excluded from this list. Is there a simple code I can use to achieve this? Thanks in advance!


Forum Moderator, 5523 Posts

24 February 2011 at 8:16pm

Wrap your li in a <% if LinkOrCurrent = Link %>...<% end_if %> $LinkOrCurrent will return 'link' or 'current'.


Community Member, 11 Posts

25 February 2011 at 5:28am

Ohh, Lovely! Thank you Will! =)