Developer forum

Forum » Templates » XSLT menu parent and subpages

XSLT menu parent and subpages

Victor Jonsson
Reply

Hi there.

I can't quite figure out how to do this.

I have navigation that is two levels. On a top level menu item, I need to be able to show a menu of subpages *with* the top menuitem/parent.

E.g. imagine this menu where about us is a main menu item and has a few subpages.

  1. About us 
  2.   Contact
  3.   Location

About us should always be visible and clickable throughout the pages.

I admit XSLT is not my strong suite and I've only been able to either get only the subpages or everything on the top level (siblings to About us). I've also tried some of the dwnavigation parameters but I've yet to find the right combination of parameters and XSLT to accomplish this.

Appreciate the help.

Regards, Victor

 


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Victor

 

Not sure I fully understand what you are trying to achieve.

 

About us and other toplevel items are in a top menu. Where are the sub items? Also in the top? Or in the left? or as dropdowns...?

 

If you have a design, you can attach it so we can see it.

 

BR Nicolai

 
Victor Jonsson
Reply

Hi Nicolai and thank you for your quick reply.

I've attached a simple example that illustrates how this menu should work.

Essentially, the subpages menu would also have the parent at the top, so that you can navigate that whole section of content vertically, within the same menu.

Regards Victor

navigation-xslt-example.png
 
Nicolai Høeg Pedersen
Reply

Hi Victor

 

That looks exactly like a regular top/left navigation. And exactly that is described in the Designs & Layout manual.

 

You just need 2 navigations - one in top with start and endlevel = 1 and one in the left with start and endlevel = 2. On your left navigation as a heading for the items in the left, use the DwTopPageName template tag.

http://templates.dynamicweb-cms.com/TemplateTags/Dynamicweb-template-tags/Page-tags/Page/DwTopPageName.aspx

 

BR Nicolai

 
Victor Jonsson
Reply

Thank you Nicolai.

I've got it working now. Somehow i overlooked the DwTopPageName tag.

Thank you for the help!

Regards, Victor.

 

 

 

 

 

 

You must be logged in to post in the forum