Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Build a Submenu with CSS list webpart View modes: 
User avatar
Member
Member
J4F - 4/28/2011 2:57:13 AM
   
Build a Submenu with CSS list webpart
Hello Community

I'm trying to build a Submenu base from mainnavigation as follow:

Menu 1 | Menu 2| Menu 3 <= Mainnavigation
- Submenu 1
- Submenu 2
- Submenu 3

Now i do like to kreate a submenu with header of klicked treemenu with all childs:
example:

Menu 2
- Submenu 1
- Submenu 2 <= klicked element.
- Submenu 3

How can I buid that with CSS List menu?
Any suggestions are welcomed.

J4F

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 4/28/2011 4:16:14 AM
   
RE:Build a Submenu with CSS list webpart
Hi,

If you need to display a name of parent node above child nodes you could insert following macro into Content before property of CSS list menu webpart:

{%cmscontext.currentdocumentparent.documentname%}

Best regards,
Ivana Tomanickova


User avatar
Member
Member
J4F - 5/2/2011 2:48:24 AM
   
RE:Build a Submenu with CSS list webpart
Hi,

Thx for the hint. This one pushed me to thinking in other directions as before.

My Problem is that i have to generate a fulli UL / LI List Menu and Manage them by CSS.
Those Styles contains complex hierarchically differences and so it would be easier to render the whole menu in one List.

In the mean case i found out a WHERE Condition to get the a close Solution:

(({%cmscontext.currentdocument.documentid%} > 0) AND (NodeLevel > 2))

But, if I navigate to a sublevel I’ll lose the higher Information and nothing is displayed.

Maybe someone can help me to find out the right WHERE condition for the entire thread idea.

Best Regards
J4F


User avatar
Member
Member
J4F - 5/4/2011 3:54:06 AM
   
RE:Build a Submenu with CSS list webpart
I got my solution after a little research.

(({%cmscontext.currentdocument.documentid%}') OR (NodeLevel > 2))

Unfortunately this solution accepts only 2 Levels in navigation. A third one would display mismatch, but in my case it doesn’t madder.

J4F

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 5/4/2011 6:50:18 AM
   
RE:Build a Submenu with CSS list webpart
Hi,

Unfortunately, I am not sure if I understand your goal. According to your solution it seems that you needed to select documents from second level dynamically.

Just for information - following article about path expressions might be useful for you next time. You could set the Path property of menu webpart to work according to the current path.

For example:
/{0}/{1}/% - returns all documents under the second level of the current path

Best regards,
Ivana Tomanickova



User avatar
Member
Member
J4F - 5/9/2011 2:53:42 AM
   
RE:Build a Submenu with CSS list webpart
Hi Ivana,

Thx for reply. Yes i got that with the path expression. But your example doesent give the parent node back. Only the childs.

What i needet was a whole branche of a treemenu with submenus when they're clicket and all Parents be visible.

J4F