I just noticed that there's a small quirk in the default CSS-menu template.
Normal list-items become menuparents even if all child-pages are set as "hide from menu". This a bit annoying when a menu item has a small arrow as an indicator of a submenu when in fact the link has no submenu.
Example: I have a contact form and have a "thank you"-page below it that is only displayed when the user sents the form. Still the menu shows a submenu arrow even though the child-page is hidden.
I'll try figuring out a conditional statement in the smarty-template but I have very little experience from smarty so if anyone has fixed this please post your solution. Thanks! (edit: I don't think this can be solved with smarty. I believe this is a problem in the menumodule)
Edit: After another seach I noticed that there was another thread already about the same issue. Any fixes yet?
I think that the $node->haschildren should check if the children are indeed to be shown in the navigation.
Default CSS-menu problem
Default CSS-menu problem
Last edited by Hare on Sun Oct 15, 2006 3:36 pm, edited 1 time in total.
Re: Default CSS-menu problem
You should just set the page to have none as parent so if it is set to not show in the menu it's not the child of any page...
Re: Default CSS-menu problem
Let me try again.
1 Home
2 Contest
2.1 Contest Winners (hidden, and waiting to be published)
3 Yada yada
Now the menu 2 is a menuparent and this causes usability problems with the CSS. Thanks to the menuparent class the menu item looks like it has a submenu, but it doesn't have since everything on the next level is hidden.
My point is that the menuengine should check if the sub-pages are hidden, not just check if there are any sub-pages. If the page is hidden -> there are no sub-pages and the menuparent should not get a menuparent class. Now hidden pages are handled just like visible pages, which imho is not a good idea.
Your solution works in this isolated case, but I would rather keep the pages grouped and as you can see this is going to affect many users.
1 Home
2 Contest
2.1 Contest Winners (hidden, and waiting to be published)
3 Yada yada
Now the menu 2 is a menuparent and this causes usability problems with the CSS. Thanks to the menuparent class the menu item looks like it has a submenu, but it doesn't have since everything on the next level is hidden.
My point is that the menuengine should check if the sub-pages are hidden, not just check if there are any sub-pages. If the page is hidden -> there are no sub-pages and the menuparent should not get a menuparent class. Now hidden pages are handled just like visible pages, which imho is not a good idea.
Your solution works in this isolated case, but I would rather keep the pages grouped and as you can see this is going to affect many users.
Last edited by Hare on Sat Nov 25, 2006 11:28 pm, edited 1 time in total.
Re: Default CSS-menu problem
this is a known problem with no proper fix yet. when menu is build there is no way to check if the childs are hidden or not. It can be done with the current code but it increases sql queries too much...
We hope to issue this problem in next version...
We hope to issue this problem in next version...
Re: Default CSS-menu problem
Hi. Thanks for the confirmation that this issue is aknowledged and will be fixed.