[Solved] Menu problem

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
afri-can
Forum Members
Forum Members
Posts: 21
Joined: Tue Jun 24, 2008 5:03 pm

[Solved] Menu problem

Post by afri-can »

  • How do I create a menu as below:

    home
    about us1
    about us2
    management
    etc...
    products
    contact

    about us1 is like a section header but clickable and about us2, management and etc... are all sub menu items 1st level

    I need to add Home, about us1, products, contact are top of the page navigation. about us2 management, etc.. are sub menus on the left of the page

    When you click about us1 I want the viewer to arrive at the about us2 page within the about us1 section
    The about us1 page is not a page only a section, but I need it to be click able.  I tried to create a link but the the section under the link page is not accesable

    Any ideas

    Steven
Last edited by afri-can on Thu Jul 10, 2008 6:26 am, edited 1 time in total.
afri-can
Forum Members
Forum Members
Posts: 21
Joined: Tue Jun 24, 2008 5:03 pm

Re: [Solved] Menu problem

Post by afri-can »

Used this template for menu manager, i found it in the documentation on menus on the main CMCMS site, had to add active parent bit to get it to highlight the parent:

Code: Select all

{* CSS classes used in this template:
#active - The active/current page
.sectionheader - To style section header
hr.separator - To style the ruler for the separator *}
{if $count > 0}
<div class="menu">
<ul id="menu">
{foreach from=$nodelist item=node}
{if $doheaderlink == "1"}
{assign var="doheaderlink" value="0"}
<li class="sectionheader"><a href="{$node->url}">{$headertext}</a>
{/if}
{if $node->depth == 1 or $showchildren == 1}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{assign var="listopen" value="1"}
{elseif $node->depth < $node->prevdepth}
{if $listopen == "1"}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}
{assign var="listopen" value="0"}
{/if}
</li>
{elseif $node->index > 0}</li>
{/if}

{if $node->current == true}
<li id="active"><a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>

{elseif $node->parent == true && $node->depth == 1}
<li class="activeparent"> <a href="{$node->url}" class="activeparent"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} </a>

{elseif $node->type == 'sectionheader'}
{assign var="doheaderlink" value="1"}
{if $node->parent == true}
{* NOTE: Disabled showing of children here *}
{assign var="showchildren" value="0"}
{else}
{assign var="showchildren" value="0"}
{/if}
{assign var="headertext" value=$node->menutext}
{elseif $node->type == 'separator'}
<li id="separator">
{else}
<li><a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>{/if}
{/if}

{/foreach}
{if $listopen == "1"}
{repeat string="</li></ul>" times=$node->depth-1}
{/if}
</li>
<li id="empty"></li>
</ul>
</div>
{/if}
Post Reply

Return to “CMSMS Core”