Page 1 of 1
Side Navigtaion, Dynamic Start Level
Posted: Tue Jul 29, 2008 1:56 am
by Gosha
Hi, I'm trying to figure out how I could set up a dynamic side navigation so that the start level of the items that appear is relevant to the level your page is on. Say I'm on the second level, it would only display second level links, then if I click on one, it would only display the third level links without having second level links on it, kind of like switching the start level from 2 to 3.
I mainly want it to only show the current level that the page is in, instead of being a collapsable navigation.
If anyone could help me out, I'd be thankful!
Re: Side Navigtaion, Dynamic Start Level
Posted: Tue Jul 29, 2008 2:14 am
by Jack @ PharSide
Hi there,
I just did this and I actually called two versions of the same navigation (verticall CSSMenu).
1. I basically created a copy of CSSMenu Vertical and renamed it something like submenu instead while keeping the original in tact. I then copied the CSS for the original CSSMenu and renamed versions of each for the new Sub CSSMenu version.
2. I then placed this tag where I wanted the GLOBAL NAV: {menu template='cssmenu.tpl' number_of_levels='1'}
3. I then placed this tag where I wanted the next level (or subnav): {menu template='SubNav' start_level="2" number_of_levels="3"}
NOTES:
NUMBER OF LEVELS = how many deep?
START LEVEL = I started the subnav @ level 2
Good luck & hope that helps,
-Jack
Re: Side Navigtaion, Dynamic Start Level
Posted: Tue Jul 29, 2008 3:33 am
by Gosha
Thanks for the help, but that isn't the solution i'm looking for. I'm already doing something like that for the main navigation and sidenav. I think I might just make two templates, and call one 2nd level and one 3rd level and have the code on 2nd level start at start_level='2' and the third start at 3 for the sidenav.
The site I'm redoing is this one...
http://www.esd113.k12.wa.us/templates/C ... spx?ID=767
If you click on departments, you'll see how the sidenav changes reflecting the level it is currently on. I'm trying to do something like that.
Re: Side Navigtaion, Dynamic Start Level
Posted: Mon Mar 30, 2009 12:46 pm
by new2thiscms
{menu template="sidenav" start_level="3" number_of_levels="1" assign="level3"}
{menu template="sidenav" start_level="2" number_of_levels="1" assign="level2"}
{if $level3 != ''} {$level3}{else}{$level2}{/if}
Give that a try...I did this for a site and it worked for me...Add as many levels as you want.