-
Notifications
You must be signed in to change notification settings - Fork 159
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
Hidden sub-menue item breaks menu-structur #522
Comments
This issue still exists. Hack fix as above works, but not really a solution. |
Hi, They have added:
to T3BootstrapTpl::render() but this is the wrong place for this code - by now the array of menu items should just be rendered. Here is the git patch for the file in our site: It adds the $hidden_parents array:
plus adds exactly the same menu_show check as the core file before the $item->parent = ... line :
This fixes the broken menu html for our site. |
Thanks @altcom-neil - I've committed this to master here though judging by outstanding PR's, I doubt this will ever get merged 😞 |
If the last submenu item is set to 'hidden' (not shown), the ul/li - stuctur is broken
Threfore I added the closing statment before continue:
Now ist works, but ...
... if there is only one sub-item and this is hidden, the 'caret' is still shown.
To fix this 'quick and dirty' I compare in the type-functions a small hint from the menu-item-note.
My changes work ;) ... but only until the next update.
I propose a recursive buildup of the menu instead of the linear one in the function render($list). Then you know exactly whether an item is displayed and whether whole submenus may be empty and no dropdowns are to be displayed (not use $item->deeper, this could be hidden).
The text was updated successfully, but these errors were encountered: