Menu Manager Help

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
MrZeDark
New Member
New Member
Posts: 5
Joined: Fri Feb 01, 2013 1:00 pm

Menu Manager Help

Post by MrZeDark »

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 :)
reinhardmohr
Forum Members
Forum Members
Posts: 112
Joined: Sun Aug 06, 2006 2:36 pm

Re: Menu Manager Help

Post by reinhardmohr »

Hi,

as far as I see it there is no need for you at all to care about the menu manager. As soon as you create new pages and shift them into the order you want the menu is created automatically for you. That is one of the great features of CMSMS.
So just create more pages or add an additional level of pages – the menu will adapt automatically!
The only exception: When the person who created the template for your pages has limited the number of levels that are shown in the menu by adding a parameter (number_of_levels) to the menu-tag in the template.
There is some explanation in the help section f menu manager and here, too:
http://docs.cmsmadesimple.org/modules/core/menu-manager

Good luck

Reinhard
MrZeDark
New Member
New Member
Posts: 5
Joined: Fri Feb 01, 2013 1:00 pm

Re: Menu Manager Help

Post by MrZeDark »

Thank you for your input.

However I don't think I explained myself well enough :)

Right now my menu parent is @ 12.0
It then cascades thru 12.1 - 12.5
However when I incorporate my new pages 12.1.1-12.1.5, it meshes the text together into a blur of text rather than cascading properly.
Then I have a secondary menu template that works properly. So that when you go to 12.1 thru the menu it will show ONLY 12.1.1-12.1.5. However as soon as you return to 12.1 it blurs all the menu pages together again.

To fix this I've had to create a new parent that 12.1 redirects to (19.0) and made a new menu of 19.1-19.5. It seems as though it is the only way I can actually keep the menu 'bug free'.

However this process is time consuming to create new parents and sub-directories in order to make a menu work properly.

I tried creating 'levels' as you mentioned but it did not change anything and I ended up with a smarty error. So i restored it back to it's previous form.

Being this -
{assign var="start_at_element" value=12.1}
{assign var="stop_at_element" value=12.5}

{assign var="counter" value=0}
{if $count > 0}{strip}
<div id="subMenu">
{foreach from=$nodelist item=node}

{if $node->hierarchy >= $start_at_element && $node->hierarchy <= $stop_at_element}
{if $node->depth > $node->prevdepth}
{repeat string="<ul class='sideMenu'>" 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}
</li></div>
{/strip}{/if}


Im pulling my hair out on this one, as it's turning out to be way more work than I need it to be.
reinhardmohr
Forum Members
Forum Members
Posts: 112
Joined: Sun Aug 06, 2006 2:36 pm

Re: Menu Manager Help

Post by reinhardmohr »

Hi,
I am not really sure if this helps. But the meshed text somehow let‘s me think it‘s not a menu manager problem but a css problem (I had a similar one years ago and this reminds me of it). I describe it but I‘m not sure if I understand your problem properly:
The menu actually is an unordered list defined in the menu-stylesheets. And sometimes there the creator of this stylesheet did not define the third or fourth level of this unordered list. So you have to add it yourself – what is not too complicated. In one of the default stylesheets for the css menu I just now found the following comment:

Code: Select all

/* The magic - set to work for up to a 3 level menu, but can be increased unlimited, for fourth level add
#primary-nav li:hover ul ul ul,
#primary-nav li.menuparenth ul ul ul,
*/
So maybe the guy who originally designed your website did not create a sufficient number of levels for the menu. Now you add a level and it‘s not defined and your menu blurs? Could it be this?

Good luck

Reinhard
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu Manager Help

Post by Dr.CSS »

This type of problem will require a link to the problem site/page...
reinhardmohr
Forum Members
Forum Members
Posts: 112
Joined: Sun Aug 06, 2006 2:36 pm

Re: Menu Manager Help

Post by reinhardmohr »

Hi, Dr . CSS,

there was a link in the original post:

http://www.apluspartyrentalme.com/

Reinhard
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu Manager Help

Post by Dr.CSS »

Sorry, didn't see it, but I don't see a problem with the menu...
MrZeDark
New Member
New Member
Posts: 5
Joined: Fri Feb 01, 2013 1:00 pm

Re: Menu Manager Help

Post by MrZeDark »

I do not have a link to the problem, as I am only in the office once a week for the website. So I can't leave the website in any sort of disarray when I am out of the office :)

I will see if I can get a 'test' page going today and I will link it here. Have a lot to do. Heh..
MrZeDark
New Member
New Member
Posts: 5
Joined: Fri Feb 01, 2013 1:00 pm

Re: Menu Manager Help

Post by MrZeDark »

of course you don't see the problem with the menu :)

I can't leave the website with an error/bug on it. So the website as it is, looks fine.

So i attached an image of what it looks like when it's trying to show a subcategory in the menu. Best i can do, my boss does not want me to leave an issue on the site when I leave for the day.

Hope it helps :)
Attachments
The Menu Issue
The Menu Issue
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu Manager Help

Post by Dr.CSS »

You are using menu CSS that wasn't built for more then 2 levels, look to one of the CMSMS default cssmenu stylesheets to see how it does it...

http://multiintech.com/defaultcontent/d ... ontal.html
MrZeDark
New Member
New Member
Posts: 5
Joined: Fri Feb 01, 2013 1:00 pm

Re: Menu Manager Help

Post by MrZeDark »

Thanks for the help everyone..

I ran into a wall though with the recent idea. It's probably exactly what i need to do, from what I read. However my current host doesn't allow me to install / write / edit new or existing Style sheets. Unless I pay them to do it for me. Which is ridiculous..

Thanks for all the assistance and input people provided :)
reinhardmohr
Forum Members
Forum Members
Posts: 112
Joined: Sun Aug 06, 2006 2:36 pm

Re: Menu Manager Help

Post by reinhardmohr »

Hi,

this is simply not possible – your host cannot log you out. Your host does not give you rights and permissions in your CMSms installation. Someone is the administrator for CMSms and he can grant you every right to edit and add stylesheets.
Maybe it‘s your boss who has an administrator account. At least the person who originally installed CMSms is an administrator and he can grant you all the necessary permissions – and that‘s only a click!

By the way: I mentioned that your problem is css-related in my post from the 20 February. You should read it as it will hopefully point you to the right spot in the stylesheet.

Good luck!

Reinhard
Post Reply

Return to “The Lounge”