Page 2 of 2

Re: Menu manager get child elements

Posted: Fri Jul 16, 2010 6:40 pm
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.

Re: Menu manager get child elements

Posted: Sun Jul 18, 2010 9:43 pm
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

Re: Menu manager get child elements

Posted: Sun Jul 18, 2010 10:48 pm
by NaN

Re: Menu manager get child elements

Posted: Mon Jul 19, 2010 8:33 pm
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

Re: Menu manager get child elements

Posted: Mon Jul 19, 2010 8:56 pm
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...

Re: Menu manager get child elements

Posted: Thu Jul 22, 2010 3:45 pm
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