Menu Manager Help
Posted: Fri Feb 01, 2013 1:11 pm
Hello, I have a question about the Menu Manager. Let me give you some background on myself first.
I am in charge of managing a website belonging to a company I work for. I did not solely design the site. It's foundation was put together by another company. Essentially, all I do is edit text and pictures. Create new pages and fix bugs.
However, my boss has charged me with needing a new series of menus.
Right now, our menu's cascade down one level. However I need to have one particular menu cascade down two levels so that I can create a # of pages. In example -
Menu: (as it is now)
Tents
Frame Tents
Pole Tents
Sailcloth Tents
Sidewalls
Menu: (How he wants it)
Tents
Frame Tents
Pole Tents
Page #1
Page #2
Page #3
Sailcloth Tents
Sidewalls
I've looked thru the documentation on this site to see if I can make heads or tails of the menu manager. However it seems that most of the hard-code for the menu manager isn't sited as examples in any of the documentation i've read. So I am at a loss.
This is the current script- CMS ver. 1.9.4.1 "Faanui"
{assign var="start_at_element" value=11}
{assign var="stop_at_element" value=18}
{assign var="counter" value=0}
{if $count > 0}{strip}
<ul class="mainMenu">
{foreach from=$nodelist item=node}
{if $node->hierarchy >= $start_at_element && $node->hierarchy <= $stop_at_element}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}</li>
{elseif $counter > 1 and $node->hierarchy != $start_at_element and $node->hierarchy != $stop_at_element}
{if $node->type != 'separator' and ($node->type != 'sectionheader' and $node->haschildren != true) or ($node->type =='sectionheader' and $node->haschildren == true)}</li>
{elseif $node->type != 'separator'}</li>{/if}
{/if}
{if $node->depth == 1 and $node->type != 'separator' and $node->type !='sectionheader'}
<li class="menu-{$node->alias}{if $node->alias ==$cgsimple->get_root_alias()} active{/if}"><a href="{$node->url}" class="mainMenuLink" title="{$node->menutext|html_entity_decode}"{if $node->target ne ""} target="{$node->target}"{/if}><span></span>{$node->menutext|html_entity_decode}</a>
{elseif $node->depth != 1 and $node->type != 'separator' and $node->type !='sectionheader'}
<li class="{if $node->alias == $page_alias}sub_active{/if}"><a href="{$node->url}" class="subMenuLink" title="{$node->menutext|html_entity_decode}"{if $node->target ne ""} target="{$node->target}"{/if}><span></span>{$node->menutext|html_entity_decode}</a>
{elseif $node->depth == 1 and $node->type =='sectionheader' and $node->haschildren == true}
<li class="{if $node->alias == $page_alias}sub_active{/if}"><a class="{$node->alias} test" href="{$smarty.get.page}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}><span></span>{$node->menutext|html_entity_decode}</a>
{elseif $node->type =='sectionheader' and $node->haschildren != true}
{* do nothing if sectionheader with no children *}
{/if}
{assign var="counter" value=$counter+1}
{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}
</ul>
{/strip}{/if}
Maybe I'm looking in the wrong spot, however the other "Menu" scripts determine a non-cascading menu template located on the left side of 'every' page.
The website itself is www.apluspartyrentalme.com
Thank You
I am in charge of managing a website belonging to a company I work for. I did not solely design the site. It's foundation was put together by another company. Essentially, all I do is edit text and pictures. Create new pages and fix bugs.
However, my boss has charged me with needing a new series of menus.
Right now, our menu's cascade down one level. However I need to have one particular menu cascade down two levels so that I can create a # of pages. In example -
Menu: (as it is now)
Tents
Frame Tents
Pole Tents
Sailcloth Tents
Sidewalls
Menu: (How he wants it)
Tents
Frame Tents
Pole Tents
Page #1
Page #2
Page #3
Sailcloth Tents
Sidewalls
I've looked thru the documentation on this site to see if I can make heads or tails of the menu manager. However it seems that most of the hard-code for the menu manager isn't sited as examples in any of the documentation i've read. So I am at a loss.
This is the current script- CMS ver. 1.9.4.1 "Faanui"
{assign var="start_at_element" value=11}
{assign var="stop_at_element" value=18}
{assign var="counter" value=0}
{if $count > 0}{strip}
<ul class="mainMenu">
{foreach from=$nodelist item=node}
{if $node->hierarchy >= $start_at_element && $node->hierarchy <= $stop_at_element}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}</li>
{elseif $counter > 1 and $node->hierarchy != $start_at_element and $node->hierarchy != $stop_at_element}
{if $node->type != 'separator' and ($node->type != 'sectionheader' and $node->haschildren != true) or ($node->type =='sectionheader' and $node->haschildren == true)}</li>
{elseif $node->type != 'separator'}</li>{/if}
{/if}
{if $node->depth == 1 and $node->type != 'separator' and $node->type !='sectionheader'}
<li class="menu-{$node->alias}{if $node->alias ==$cgsimple->get_root_alias()} active{/if}"><a href="{$node->url}" class="mainMenuLink" title="{$node->menutext|html_entity_decode}"{if $node->target ne ""} target="{$node->target}"{/if}><span></span>{$node->menutext|html_entity_decode}</a>
{elseif $node->depth != 1 and $node->type != 'separator' and $node->type !='sectionheader'}
<li class="{if $node->alias == $page_alias}sub_active{/if}"><a href="{$node->url}" class="subMenuLink" title="{$node->menutext|html_entity_decode}"{if $node->target ne ""} target="{$node->target}"{/if}><span></span>{$node->menutext|html_entity_decode}</a>
{elseif $node->depth == 1 and $node->type =='sectionheader' and $node->haschildren == true}
<li class="{if $node->alias == $page_alias}sub_active{/if}"><a class="{$node->alias} test" href="{$smarty.get.page}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}><span></span>{$node->menutext|html_entity_decode}</a>
{elseif $node->type =='sectionheader' and $node->haschildren != true}
{* do nothing if sectionheader with no children *}
{/if}
{assign var="counter" value=$counter+1}
{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}
</ul>
{/strip}{/if}
Maybe I'm looking in the wrong spot, however the other "Menu" scripts determine a non-cascading menu template located on the left side of 'every' page.
The website itself is www.apluspartyrentalme.com
Thank You
