21284 Posts in 5731 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1178 Views |
-
Show Top Level Page on any SubPage (SOLVED)

7 September 2009 at 2:12pm Last edited: 7 September 2009 4:53pm
Hi Everyone:
I have a level 2 navigation that shows up whenever you go past the main navigation links. The navigation box will show:
Main Page Title (with url)
sub page
sub page
sub page
etcI am fine when i am 1 level deep. For example i click on About (from main nav) and choose Board Members from the drop down.
The Nav box will then show:
About
sub page
sub page
Board mmbers
etcThe problem arises when i click on Board Members. The Nav box then shows:
Board Members
sub page
sub page
Board Members
etcWhat I want to show is:
About
sub page
sub page
Board Members
etcThis way, no matter how far you drill down the top header of the Nav box will always show the main link with its level 2 links below.
Here is the code I am using:
<% if Menu(2) %>
<div id="RightNavLatestInfoContainer">
<div id="RightNavLatestInfoTop"></div>
<div id="RightNavLatestInfoBody">
<div id="subnavbox">
<% if Level(2) %>
<div class="subnavheader"><a href="$Parent.Link">$Parent.Title</a></div>
<% else %>
<div class="subnavheader"><a href="$Link">$Title</a></div>
<% end_if %>
<div class="RecentInfoBlocksRight">
<ul>
<% control Menu(2) %>
<li class="$LinkingMode"><span class="bulletback"><a href="$Link">$MenuTitle</a></span></li>
<% end_control %>
</ul>
</div>
</div>
</div>
<div id="RightNavLatestInfoBottom"></div><!--This is and ends the bottom image for Latest Info -->
</div><!--This ends the container for the latest info it is fluid vertically-->
<% end_if %>I am pretty sure it has to do with my if statements and controls. I have spent 4 hours with no luck, so am turning to you guys. All I want to make sure is that the "subnavheader" div always shows the top level navigation and the "RecentInfoBlocksRight" shows the level 2 navigation no matter if I go to level 3, 4, 5 etc.
HELP!!!
-
Re: Show Top Level Page on any SubPage (SOLVED)

7 September 2009 at 2:41pm
Instead of $Parent.Title which will take the parent - so always 1 level up, try $Level(2).Title or $Level(1).Title which will always return the 2nd level and 1st level title respectively.
-
Re: Show Top Level Page on any SubPage (SOLVED)

7 September 2009 at 4:52pm
Will
Thanks so much. Oddly, I tried that before, but looks like I had other code messing it up and thought maybe that option no longer worked. Thanks for clarifying, i can actually sleep tonight!!!
| 1178 Views | ||
|
Page:
1
|
Go to Top |


