Sub Page Menu Help
Posted: Wed Sep 05, 2007 7:48 pm
Hi,
Ok, I have a top menu which links to all the "parent" sections of my site. On the right hand side I am trying to add a menu that displays all the child pages for the currrently viewed parent section. The menu on the top consists of only the items which have been set to be showing in menu, the right hand side will consist of child pages that are set to NOT display in the menu.
I've figured out how to show the "hidden" items but I'm still having a problem with the child pages listing properly. So here is my layout
1 - Home
1.1 - News
1.1.1 - News About Us On Other Sites
2 - Section 2
2.1 - Page X
2.1.1 - Page X2
Ok, now here is how I would like the right menu displayed on each page (dynamically of course)
1: News
1.1: News About Us On Other Sites
1.1.1: NOTHING (Unless I Add A 1.1.1.1)
2: Page X
2.1: Page X2
2.1.1: NOTHING (Unless I Add A 2.1.1.1)
Here is what I have in my page template:
Here is what I have in the menu template "Andreas02RightMenu"
Now its working fine so far except, On The Home/1 Page It is displaying 1.1 like it is supposed to but it is also displaying 2.1 but, on 2.1 is is only displaying 2.1.1 like it is supposed to!
Lol I'm stumped and confused, Ive been working on this forever now and I figured it was time to ask for help from those a bit more experienced than myself.
Thanks In Advance!
Ok, I have a top menu which links to all the "parent" sections of my site. On the right hand side I am trying to add a menu that displays all the child pages for the currrently viewed parent section. The menu on the top consists of only the items which have been set to be showing in menu, the right hand side will consist of child pages that are set to NOT display in the menu.
I've figured out how to show the "hidden" items but I'm still having a problem with the child pages listing properly. So here is my layout
1 - Home
1.1 - News
1.1.1 - News About Us On Other Sites
2 - Section 2
2.1 - Page X
2.1.1 - Page X2
Ok, now here is how I would like the right menu displayed on each page (dynamically of course)
1: News
1.1: News About Us On Other Sites
1.1.1: NOTHING (Unless I Add A 1.1.1.1)
2: Page X
2.1: Page X2
2.1.1: NOTHING (Unless I Add A 2.1.1.1)
Here is what I have in my page template:
Code: Select all
{cms_module module='menumanager' template='Andreas02RightMenu' show_all='1'}
Code: Select all
<h2>More Stuff</h2>
{assign var="depth" value="-2"}
{assign var="depthcheck" value="0"}
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->index == 0}
{elseif $node->haschildren == true }
{elseif $node->haschildren == false }
{/if}
{if $depthcheck == 1 && $node->depth != $node->prevdepth}
{assign var="depth" value=$node->depth}
{assign var="depthcheck" value="0"}
{assign var="listopened" value="1"}
{/if}
{if $node->depth == $depth}
<a class="sidelink" href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>
{$node->titleattribute}
{/if}
{if $node->current == true && $node->haschildren == true}
{assign var="depthcheck" value="1"}
{/if}
{/foreach}
{if $listopened == 1}
{/if}
{/if}
Now its working fine so far except, On The Home/1 Page It is displaying 1.1 like it is supposed to but it is also displaying 2.1 but, on 2.1 is is only displaying 2.1.1 like it is supposed to!
Lol I'm stumped and confused, Ive been working on this forever now and I figured it was time to ask for help from those a bit more experienced than myself.
Thanks In Advance!