just add, items="home, about, services, products, my-account"
where those names represent the page alias:
;http://my-domain.com/about ===> "about" is the page alias
Use Menu Manager and Items List for multiple menus
Re: Use Menu Manager and Items List for multiple menus
Last edited by Dr.CSS on Tue Mar 04, 2014 10:11 pm, edited 1 time in total.
Reason: Please use double quotes or something on fake links so they aren't clickable...
Reason: Please use double quotes or something on fake links so they aren't clickable...
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo
--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
Re: Use Menu Manager and Items List for multiple menus
I think you should start updating your cmsms installation to the most recent version.
About the menu:
I'd consider creating a slightly customized menu template; leave the opening and closing <div> and/or <ul> out. In the example below I've named it 'customtemplatename'.
Then create a page hierarchy:
Then use two {menu} calls:
You could then create 3 templates, one for every business unit. Each with their own call to menu or think of some logic to dynamically find the current section header/parent.
There would also be a more static approach: hardcode the general menu items in the menu template. But that would mean an editor should not add or remove those general pages, nor change the alias of those. Thinking of it: you wouldn't easily know whether those static menu items are current page for styling etc. So don't think it's a good approach.
About the menu:
I'd consider creating a slightly customized menu template; leave the opening and closing <div> and/or <ul> out. In the example below I've named it 'customtemplatename'.
Then create a page hierarchy:
Code: Select all
- general (section header)
- home (page)
- about (page)
- unit1 (section header)
- page A
- page B
- ...
- unit2 (section header)
- page D
- page E
- ...
- unit3 (section header)
- page G
- page H
- ...
Code: Select all
<div id="menuwrapper">
<ul id="primary-nav">
{menu template='customtemplatename' childrenof='general'}
{menu template='customtemplatename' childrenof='unit1'}
</ul>
</div>
There would also be a more static approach: hardcode the general menu items in the menu template. But that would mean an editor should not add or remove those general pages, nor change the alias of those. Thinking of it: you wouldn't easily know whether those static menu items are current page for styling etc. So don't think it's a good approach.
Code: Select all
{* CSS classes used in this template:
#menuwrapper - The id for the <div> that the menu is wrapped in. Sets the width, background etc. for the menu.
#primary-nav - The id for the <ul>
.menuparent - The class for each <li> that has children.
.menuactive - The class for each <li> that is active or is a parent (on any level) of a child that is active. *}
{assign var='number_of_levels' value=10000}
{if isset($menuparams.number_of_levels)}
{assign var='number_of_levels' value=$menuparams.number_of_levels}
{/if}
{if $count > 0}
<div id="menuwrapper">
<ul id="primary-nav">
{* hard coded menu items at the beginning *}
<li>{cms_selflink page='home'}</li>
<li>{cms_selflink page='about'}</li>
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
...
{/if}
{/foreach}
{repeat string='</li><li class="separator once" style="list-style-type: none;"> </li></ul>' times=$node->depth-1}
</li>
{* hard coded menu items at the end *}
<li>{cms_selflink page='contact'}</li>
</ul>
<div class="clearb"></div>
</div>
{/if}