Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > css list menu - only show nodes with subnodes View modes: 
User avatar
Member
Member
kees-vn - 7/26/2011 3:22:45 AM
   
css list menu - only show nodes with subnodes
I setup a css list menu using path = /% and max nesting level = 2
This shows all of my nodes inside the site's root and there subnodes.

My problem is that I only need to show the nodes in the root, if that has subitems. So for example if my site's structure looks like this:

-Site
-Page 1
-Sub1
-Sub2
-Page 2
-Page 3
-Sub1


I want a css list menu that shows me:
Page1
Sub1
Sub2
Page 3
Sub1

Is there any way to do this?

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 7/26/2011 5:27:07 AM
   
RE:css list menu - only show nodes with subnodes
Hello,


you can use a Where condition like:

Where (NodeLevel = 1) and (NodeChildNodesCount = 0)

The NodeChildNodesCount property stores a number of child documents.


Best regards,
Helena Grulichova

User avatar
Member
Member
kees-vn - 7/26/2011 5:40:16 AM
   
RE:css list menu - only show nodes with subnodes
Thank you, that helped me into the right direction.

For anyone wondering, this is my final solution (put this in the WHERE field of the webpart)

((NodeLevel = 1) and (NodeChildNodesCount > 0)) or ((NodeLevel = 2) and (NodeChildNodesCount = 0))