Menu manager get child elements

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.
NaN

Re: Menu manager get child elements

Post by NaN »

Two ways to do this:

1. put the divs in the MenuManager template inside the {if $count > 0} condition:

Code: Select all


{if $count > 0}
<div id="submenuWrap">

...

</div>
{/if}

    Remove it from page template and just use the {menu} tag of the submenu.
    So only if there are menu items found by the MenuManager the div will be
    created by the menu template itself.

    (this is what Dr.Css suggested and would be the very easiest way)

2. Install CGSimpleSmarty module and do this in your page template:

Code: Select all


{if $cgsimple->has_children()}
...
{/if}

    Take a look in the TypoFolio template for examples. There the sidebar is controled this way.
simon.romin
Forum Members
Forum Members
Posts: 65
Joined: Tue Jul 13, 2010 9:31 am

Re: Menu manager get child elements

Post by simon.romin »

Hi NaN,

Thanks for the reply.

I have tried what you suggested and it sort of works.

There are still problems though. I get this error message whenever I click on a parent item:

Code: Select all

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 19456 bytes) in /home/SITENAME/public_html/test/modules/MenuManager/action.default.php on line 44
I don't understand anything in the MenuManager template - it's all jibberish to me.

Could you go into a bit more detail please?

Alternatively, is there a user guide or something you can recommend that would solve my problem?

Thanks,

Romano
simon.romin
Forum Members
Forum Members
Posts: 65
Joined: Tue Jul 13, 2010 9:31 am

Re: Menu manager get child elements

Post by simon.romin »

Okay, I think I've nearly solved this issue.

I now understand that I need to make the relevant modifications in the Menu Manager.

The most effective way is for me to hide any sub navigation when not in use is to set CSS display: none;.

How can I do this in the Menu Manager?

Thanks,

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

Re: Menu manager get child elements

Post by Dr.CSS »

"hide sub navigation on what menu template, menu has a parameter that will only show top level, number_of_levels='1' or if it's a side menu of children and you only want to show second level and the children of it when it's active, collapse='1', read the Help of menu manager for more parameters it takes...
simon.romin
Forum Members
Forum Members
Posts: 65
Joined: Tue Jul 13, 2010 9:31 am

Re: Menu manager get child elements

Post by simon.romin »

My problem has been solved - I don't know if it solves everyone elses problem but this is how uniqu3 solved it for me:

http://forum.cmsmadesimple.org/index.ph ... 18264.html
Post Reply

Return to “CMSMS Core”