Hello everyone,
I'm having problems hiding some menu levels, and I've tried using start_level, collapse, and number_of_levels and it didn't worked.
My menu is something like this:
- Home
- Products
-- Menu 1
--- SubMenu 1
---- SubSubMenu 1
--- SubMenu 2
---- SubSubMenu 2
---- SubSubMenu 3
-- Menu 2
--- SubMenu 3
What I'm trying to achieve is to show just the content for a given level, for example if I'm on SubMenu 2 I just want the menu to show:
--- SubSubMenu 2
--- SubSubMenu 3
Instead it is showing also the content for SubMenu 1.
Could anyone please give me a hand with this?
Thanks in advance.
Mr. Bacan
[SOLVED] Menu Manager Hiding Levels
[SOLVED] Menu Manager Hiding Levels
Last edited by mr.bacan on Mon Dec 27, 2010 3:45 pm, edited 1 time in total.
-
- Forum Members
- Posts: 137
- Joined: Thu Oct 26, 2006 9:20 am
- Location: Dresden - Saxony - Germany
Re: Menu Manager Hiding Levels
collapse="1" should do the work
Re: Menu Manager Hiding Levels
Find the template this page uses and see how the menu tag is called, I think it does what you want...
http://multiintech.com/defaultcontent/i ... ge=navleft
http://multiintech.com/defaultcontent/i ... ge=navleft
Re: Menu Manager Hiding Levels
Thanks for your suggestions, but it's not working as needed.
I tried different combination using collapse and nothing. I also tried using the same menu from the template you suggested Dr.CSS, and nothing.
So I tried this on my main template (not on my Menu Manager Template):
Thanks for any advice you could give on this.
I tried different combination using collapse and nothing. I also tried using the same menu from the template you suggested Dr.CSS, and nothing.
So I tried this on my main template (not on my Menu Manager Template):
But this didn't worked as I thought, because it is only showing level 4 menu contents, and when I'm on level 2 or level 3 it shows nothing.{if $node->depth == 2}
{menu start_level='2' number_of_levels='1'}
{elseif $node->depth == 3}
{menu start_level='3' number_of_levels='1'}
{else}
{menu start_level='4' number_of_levels='1'}
{/if}
Thanks for any advice you could give on this.
Re: Menu Manager Hiding Levels
Code: Select all
{if $node->depth == 2}
{menu start_level='2' number_of_levels='1'}
{elseif $node->depth == 3}
{menu start_level='3' number_of_levels='1'}
{else}
{menu start_level='4' number_of_levels='1'}
{/if}
All you need is one menu call in template {menu collapse='1' template='yourMMtemplate'} the rest is done with CSS and MenuManager Template.
Re: Menu Manager Hiding Levels
Thanks for your reply unique3, I already tried what you suggested, in fact it is how I'm using it right now and is not what I'm looking for.
Check how it's displaying right now using {menu collapse='1'}
http://beta.nexorone.com/en/integration-scheme.html
What I need, is when I'm on that level the menu just shows that level's items.
I also tried {menu collapse='1' number_of_levels='1'} and nothing
Thanks again for your support.
Check how it's displaying right now using {menu collapse='1'}
http://beta.nexorone.com/en/integration-scheme.html
What I need, is when I'm on that level the menu just shows that level's items.
I also tried {menu collapse='1' number_of_levels='1'} and nothing

Thanks again for your support.
Re: Menu Manager Hiding Levels
So if i understand it right, you need 1st level navigation in the sidebar, if level is deeper than 1 than only children of that level should be shown??
If your answer is yes:
Create a UDT, call it level and install CGSimpleSmarty
In your template:
or something like this
But in the second option i dont know how would you come to second level :)
Well at least i hope you got some pointers from this and can find your way to get your menu working :)
Actualy you could do it your way to
If your answer is yes:
Create a UDT, call it level and install CGSimpleSmarty
Code: Select all
$gCms = cmsms();
$hierarchy = count(explode(".", $gCms->variables['friendly_position']));
$smarty->assign('level', $hierarchy);
Code: Select all
{*get title of parent page with cgsimplesmarty*}
{$cgsimple->get_page_title($cgsimple->get_parent_alias(), 'parenttitle')}
{*call level udt*}
{level}
{*if level is greater or equal 2*}
{if ($level gte '2')}
{*show menu with children of parent page*}
{menu childrenof=$parenttitle}
{else}
{*if level is 1 show main menu*}
{menu number_of_levels='1'}
{/if}
Code: Select all
{level}
{menu start_level=$level number_of_levels='1'}
Well at least i hope you got some pointers from this and can find your way to get your menu working :)
Actualy you could do it your way to

Code: Select all
{level}
{if ($level eq '2')}
{menu start_level='2' number_of_levels='1'}
{elseif ($level eq '3')}
{menu start_level='3' number_of_levels='1'}
{elseif ($level eq '4')}
{menu start_level='4' number_of_levels='1'}
{else}
{menu}
{/if}
Last edited by uniqu3 on Mon Dec 27, 2010 3:11 pm, edited 1 time in total.
(SOLVED) Menu Manager Hiding Levels
You saved me unique3, thank you very very much.
The first and last codes worked perfectly, but the one that I'm going to use because it gives me the option to even call different templates depending on the level is:
Thanks again.
The first and last codes worked perfectly, but the one that I'm going to use because it gives me the option to even call different templates depending on the level is:
Code: Select all
{level}
{if ($level eq '2')}
{menu start_level='2' number_of_levels='1'}
{elseif ($level eq '3')}
{menu start_level='3' number_of_levels='1'}
{elseif ($level eq '4')}
{menu start_level='4' number_of_levels='1'}
{else}
{menu}
{/if}