• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Drop Down Menu
PostPosted: Sat Oct 27, 2018 4:18 pm 
Offline
New Member
New Member

Joined: Sat Oct 27, 2018 11:41 am
Posts: 5
I am looking for a way to make our menu produce sub menus. The code for the menu is shown below and is a provided one in Menu Manager.


The code is:


{if $count > 0}
<div id="menuwrapper">
<ul id="primary-nav">
{foreach from=$nodelist item=node}
{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 $node->index > 0}</li>
{/if}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
<li><a
{elseif $node->current == true}
<li><a
{elseif $node->haschildren == true}
<li><a
{elseif $node->type == 'sectionheader'}
<li><span> {$node->menutext} </span>
{elseif $node->type == 'separator'}
<li style="list-style-type: none;"> <hr class="separator" />
{else}
<li><a
{/if}

{if $node->type != 'sectionheader' and $node->type != 'separator'}
href="{$node->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 ne ""} target="{$node->target}"
{/if}>{$node->menutext}</a>
{/if}
{/foreach}

{repeat string="</li>" times=$node->depth-1}</li>
</ul>
</div>
{/if}


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Drop Down Menu
PostPosted: Sat Oct 27, 2018 11:21 pm 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 12640
Location: Arizona
Do you haves pages with children..?

Does the menu tag in the tag in the template say number_of_levels='1'..?

Are you using a drop down menu stylesheet..?

More info = More help

_________________
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Drop Down Menu
PostPosted: Sun Oct 28, 2018 9:29 am 
Offline
New Member
New Member

Joined: Sat Oct 27, 2018 11:41 am
Posts: 5
Hi. Thanks for your reply. You will have to forgive me if I struggle a bit as I am a beginner at this.

Yes, I have pages with children.

If you mean this part of the template, there is no reference to levels at all.

<div id="menu">
<div class="menu_wrapper">
{menu template='Roundwood-menu' collapse='0'}
</div>

I think the stylsheet is what I am looking for, because the menu is only displaying as a single level menu.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Drop Down Menu
PostPosted: Thu Nov 01, 2018 9:46 pm 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 3020
Location: The Netherlands
What version of CMSMS are we talking about?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Drop Down Menu
PostPosted: Thu Nov 01, 2018 10:01 pm 
Offline
New Member
New Member

Joined: Sat Oct 27, 2018 11:41 am
Posts: 5
it's 1.11.7 "Genovesa"


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Drop Down Menu
PostPosted: Fri Nov 02, 2018 6:52 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Mar 23, 2006 9:25 am
Posts: 1796
Location: The Netherlands
Better first move to the latest version of cmsms; there is a difference in the approach on how to build a menu between the earlier and the later version of cmsms.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Drop Down Menu
PostPosted: Fri Nov 02, 2018 11:07 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Fri Feb 06, 2009 2:08 pm
Posts: 148
As suggested, definitely upgrade if you can -- do it even if your can't ;). But if you're *really* stuck on 1.* ...

It's hard to believe that 1.11.7 shipped with the template you quoted. It's testing for sub-menu items, etc but doing nothing...

Code:
   {if $node->parent == true or ($node->current == true and $node->haschildren == true)}
      <li><a
   {elseif $node->current == true}
      <li><a
   {elseif $node->haschildren == true}
      <li><a
   {elseif $node->type == 'sectionheader'}
      <li><span> {$node->menutext} </span>
   {elseif $node->type == 'separator'}
      <li style="list-style-type: none;"> <hr class="separator" />
   {else}
      <li><a
   {/if}


(I can't remeber 1.* too well but there might be an option to 'Reset' the template to factory-default).


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting