Portal Engine
Version 3.x > Portal Engine > Hiding Drop-down Menus Where no Sub-content Exists View modes: 
User avatar
Member
Member
boyd - 9/24/2008 2:34:14 PM
   
Hiding Drop-down Menus Where no Sub-content Exists
I'm using the portal engine and have a master page which contains a number of Drop-down Menu web parts; however, one of the drop-down menus sometimes contains no menu items, where there current page is at the bottom of the site structure (there is no content underneath it).

Is there an easy way to prevent the drop-down menu web part from displaying when there are no pages under the current page?


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/25/2008 3:23:23 AM
   
RE:Hiding Drop-down Menus Where no Sub-content Exists
Hi,

I am not sure if I am getting the right meaning because when I place the drop down menu on some page without child nodes - nothing is displayed.

Anyway, could you please try to use e.g. WHERE condition with "NodeChildNodesCount > 0" (without quotes).

Or, you can also modify the web part code and check the NodeChildNodesCount and if it is zero, you will set the web part visibility to false.


Best Regards,
Juraj Ondrus

User avatar
Member
Member
boyd - 9/25/2008 4:39:05 AM
   
RE:Hiding Drop-down Menus Where no Sub-content Exists
Thanks Juraj,

Your reply prompted me to look at the layout of the drop-down menu webpart and the web-part is in fact hidden when there are no child nodes; it's just the container that's still showing - I've amended my CSS and all now works fine.

Thanks for your help.