Page 1 of 1

(kinda solved) how do i create this kind of menu?

Posted: Sun Jan 27, 2008 6:59 pm
by Lateralus
Hello everybody,

I'v been using cmsms for a while now but i still don't understand the menumanager. I've allways used the default menu's in my previous websites, but now i would like to create a more complicated menu and I know it is possible with menu manager but i don't know how to do that :-) I've been reading the documentation but i still don't understand.

Image

The whole menu had 4 levels, the first two should be in the horizontal bar, the second two should be in the vertical bar.

Can anybody help me on the road and tell what to do? I know i'll have to make a menu template but i don't understand this :

{* CSS classes used in this template:
.activeparent - The top level parent when a child is the active/current page
li.active0n h3 - n is the depth/level of the node. To style the active page for each level separately. The active page is not clickable.
.clearfix - Used for the unclickable h3 to use the entire width of the li, just like the anchors. See the Tools stylesheet in the default CMSMS installation.
li.sectionheader h3 - To style section header
li.separator - To style the ruler for the separator *}

{if $count > 0}

{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}

{elseif $node->index > 0}
{/if}

{if $node->current == true}
Current page is {$node->hierarchy}: {$node->menutext}

{elseif $node->parent == true}
url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}>{$node->hierarchy}: {$node->menutext}

{elseif $node->type == 'sectionheader'}
{$node->menutext}

{elseif $node->type == 'separator'}


{else}
url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}{if $node->target != ''} target="{$node->target}"{/if}>{$node->hierarchy}: {$node->menutext}

{/if}

{/foreach}
{repeat string="" times=$node->depth-1}

{/if}

........

Thanks in advance!!!!!


Johan van Zanten

Re: how do i create this kind of menu?

Posted: Sun Jan 27, 2008 7:25 pm
by RonnyK
Johan,

check the default templates "CSSMenu top + 2 columns" and "Top simple navigation + left subnavigation + 1 column".
The combination of the logic is what you want. That is the CSS-caliing with number_of_levels='2' and then for the left-vertical start_level='3'.

Ronny

Re: how do i create this kind of menu?

Posted: Sun Jan 27, 2008 8:52 pm
by Lateralus
Thnx Ronny, that helped a bit.

Right now i have what i wanted, but it's a shame i still don't understand the working of the menumanager. But thanks anyway,
i've combined the two templates.

Re: (kinda solved) how do i create this kind of menu?

Posted: Sun Jan 27, 2008 11:08 pm
by Dr.CSS
The Menu Manager goes thru your page structure in Content > Pages and parses an ul li from what it finds...

The menu template uses the parsing to add calls to what it finds, class, ID, etc...

The menu tag calls tells it what template to use and if set what level or page sets to apply the template to, as in {menu template="minimum.tpl" start_page="somepagealias" show_root_siblings="1"}

start_page=  takes the page you set as it's starting point, can also use a level as in start_level=

show_root_siblings="1" means it will show the page and all it siblings say you start it at a third level page and it has 5 pages with it...

3.1 page
3.2 page
3.3 page
3.4 page
3.5 page
3.6 page

starting at 3.1 will show down to 3.6...

Re: (kinda solved) how do i create this kind of menu?

Posted: Mon Jan 28, 2008 12:58 pm
by Lateralus
thanks mark! Now i understand the way menumanager works... but maybe there is a step by step guide how to create a menu..? I'm good in html/css, and i would like to implement suckerfish for example... the default menu manager information provided by CMSMS did not help me...

Re: (kinda solved) how do i create this kind of menu?

Posted: Mon Jan 28, 2008 2:47 pm
by Lateralus
i've been reading some topics about the menu manager, i think i understand the way it works, i'll have figure it out myself

thnx anyway

/Johan

Re: (kinda solved) how do i create this kind of menu?

Posted: Mon Jan 28, 2008 10:19 pm
by Dr.CSS
To get a suckerfish type menu you can just use the cssmenu template just make sure you have the IE JS call in the look at the default CSSMenu template for it and look at the CSS attached to that template for the menu...

I believe even suckerfish uses an IE JS to work...

Re: (kinda solved) how do i create this kind of menu?

Posted: Tue Jan 29, 2008 10:34 pm
by Lateralus
yes it does! stupid IE...