-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SUPPORT] Collapse sub menus #123
Comments
Hi Fabien, The current implementation in the template would be the same as
(v:iterator.contains is a condition VH) This should expand the menu items only when the current page is part of the menu array being rendered. Hope this helps :) Cheers, |
Just to get it right. Is the "manual" rendering mandatory for this case? I tried also what follows but didn't get then the menu expanded (actually submenu of level 2, .. are never rendered). It would be much less code if I could make this work... Would the View Helper be able to recursively iterates with the inner code for its submenu? In this case
|
Yes, since you require tabindices, a
Not at this time, but I suppose it wouldn't be too much to create an alternative "autoRender" method which instead of creating tags, renders the child content for every menu level, but apart from that works exactly like "autoRender" regarding expandAll etc. You of course already know this, but if you move the If you see a use for this addition to the menu ViewHelper (and it would encompass all menu VHs) we can make a feature request for it - if at all possible, it would then be part of the next release :) |
Alright, it has worked with |
Hi Fabien, Hope my suggestions in #124 allows you to solve the problem! If so, let's close this one (but optionally leave the PR open for more work, if you think of another use case I overlooked). Cheers, |
I have a submenu composed by three levels, see in action. I would like to have them collapse by default when I am on this page ("Microdata", ... should go away) but expanded when I am on this one.
Do you see anything wrong in the current implementation? Have I missed something?
I have played with attribute "levels" and "expandAll" but none of them have brought success. I also tried generating the sub-menu without the sub loop as an attempt.
Thanks.
The text was updated successfully, but these errors were encountered: