Page 1 of 1

[solved] menu collapsing with deep structure

Posted: Wed Dec 08, 2010 3:06 pm
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!

Re: menu collapsing with deep structure

Posted: Wed Dec 08, 2010 5:13 pm
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...

Re: menu collapsing with deep structure

Posted: Wed Dec 08, 2010 6:27 pm
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.

Re: menu collapsing with deep structure

Posted: Wed Dec 08, 2010 9:02 pm
by Dr.CSS
So childrenof= is not using the collapse parameter, will check this on my 1.9.1 install...

Re: menu collapsing with deep structure

Posted: Wed Dec 08, 2010 9:12 pm
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, ...

Re: menu collapsing with deep structure

Posted: Wed Dec 08, 2010 9:31 pm
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?...

Re: menu collapsing with deep structure

Posted: Wed Dec 08, 2010 10:53 pm
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?).

Re: menu collapsing with deep structure

Posted: Wed Dec 08, 2010 11:49 pm
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.

Re: menu collapsing with deep structure

Posted: Thu Dec 09, 2010 7:36 am
by hostep
Aha nice, it works with the start_page instead of the childrenof, great!

Thanks a lot for the help!