Sub Page Menu Help

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
KillerLinks

Sub Page Menu Help

Post by KillerLinks »

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:

Code: Select all

{cms_module module='menumanager' template='Andreas02RightMenu' show_all='1'}
Here is what I have in the menu template "Andreas02RightMenu"

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!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Sub Page Menu Help

Post by Dr.CSS »

There is a default template that does this, Top simple navigation + left subnavigation + 1 column...

If you don't have it any more go to my demo site, link in the bottom of this post to see how it's done...
KillerLinks

Re: Sub Page Menu Help

Post by KillerLinks »

Thanks, I'll check into it!
KillerLinks

Re: Sub Page Menu Help

Post by KillerLinks »

mark wrote: There is a default template that does this, Top simple navigation + left subnavigation + 1 column...

If you don't have it any more go to my demo site, link in the bottom of this post to see how it's done...
Thats exactly what I needed, thanks again!!!
Locked

Return to “Layout and Design (CSS & HTML)”