[solved] menu collapsing with deep structure

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.
Post Reply
hostep
New Member
New Member
Posts: 9
Joined: Sat Feb 02, 2008 2:06 pm

[solved] menu collapsing with deep structure

Post by hostep »

Hi guys

I have a question about collapsing with the menu tag, we currently have something like this for our page structure:

Page 1
Page 2
Page 3
- Page 31
  - Page 311
  - Page 312
    - Page 3121
    - Page 3122
    - Page 3123
  - Page 313
- Page 32
  - Page 321
  - Page 322
  - Page 323
    - Page 3231
    - Page 3232
    - Page 3233
- Page 33
- Page 34
  - Page 341
    - Page 3411
    - Page 3412
    - Page 3413
  - Page 342
  - Page 343
  - Page 344
- Page 35
Page 4
Page 5


And we have a menu which we show with this tag:
{menu childrenof="Page3" collapse="1"}

Now, what we expected to see was only these pages::
Page 31, 32, 33, 34 and 35


But what we actually see is:
Page 31, 311, 312, 313, 32, 321, 322, 323, 33, 34, 341, 342, 343, 344 and 35


Is there any way we can show the menu as we want it?
Also after clicking on 31, pages 311, 312, 313 should show up additionally, and after clicking on 312, pages 3121, 3122 and 3123 should show up additionally

Anybody who knows how we can acomplish this?
And isn't this a bug in the MenuManager perhaps?

Thanks!
Last edited by hostep on Thu Dec 09, 2010 7:36 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: menu collapsing with deep structure

Post by Dr.CSS »

What version of CMSMS, what menu template did you import, what is the css, do you have a live site we can look at?...

What you describe works fine in a default install...
hostep
New Member
New Member
Posts: 9
Joined: Sat Feb 02, 2008 2:06 pm

Re: menu collapsing with deep structure

Post by hostep »

Excuse me, I forgot to mention the CMSMS version, it's the latest: 1.9.1

About the template we are using: I made a copy of the simple_navigation.tpl and changed one tiny thing in it, which has no relation with this issue we are having.

Css is not the problem, it just doesn't get outputted in html.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: menu collapsing with deep structure

Post by Dr.CSS »

So childrenof= is not using the collapse parameter, will check this on my 1.9.1 install...
hostep
New Member
New Member
Posts: 9
Joined: Sat Feb 02, 2008 2:06 pm

Re: menu collapsing with deep structure

Post by hostep »

Well the collapse is actually doing something, but not the correct thing, it only collapses the deepest level, so: 3121, 3122, 3123, 3231, ...
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: menu collapsing with deep structure

Post by Dr.CSS »

You want the second level of page 3 to show always, or just when page 3 is active parent chosen from another menu?...
hostep
New Member
New Member
Posts: 9
Joined: Sat Feb 02, 2008 2:06 pm

Re: menu collapsing with deep structure

Post by hostep »

The first thing, the second level of page 3 should always show, but the levels underneath it should not until one of the second level is clicked.
And the menu isn't involved with other menu's (as far as I know, unless this happens automagically in some way?).
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: menu collapsing with deep structure

Post by Dr.CSS »

I did {menu childrenof='default-extensions' collapse='1'} which uses the simple_navigation.tpl and it doesn't work, you could try one of these...

# (optional) start_element="1.2" - Starts the menu displaying at the given start_element and showing that element and it's children only. Takes a hierarchy position (e.g. 5.1.2).

# (optional) start_page="home" - Starts the menu displaying at the given start_page and showing that element and it's children only. Takes a page alias.
hostep
New Member
New Member
Posts: 9
Joined: Sat Feb 02, 2008 2:06 pm

Re: menu collapsing with deep structure

Post by hostep »

Aha nice, it works with the start_page instead of the childrenof, great!

Thanks a lot for the help!
Post Reply

Return to “CMSMS Core”