Developer forum

Forum » Templates » Inserting navigation outside Master and Page template

Inserting navigation outside Master and Page template

Martin Nielsen
Reply
Hi guys,

I'm using Designs and Layout, and i'd like to know how it would be possible to insert an eCom navigation inside a module template. fx. inside a Product list template.

In the old template engine, you just needed to insert our menu template and it would work.

Can it be done in D&L aswell??


Regards
 Martin

Replies

 
Nicolai Høeg Pedersen
Reply
Hi Martin

You will have to define it in the layout file - otherwise Dynamicweb will not "see" it.

So you have to define it like this:
<ul class="dwnavigation" id="leftnav" settings="">
</ul>

And then in you module template insert this template tag:
<!--@DwNavigation(leftnav)-->

That would create the navigation twice, but in the layout file you can probably do something like this:
<!--@If(Global:Page.ID=0)-->
<ul class="dwnavigation" id="leftnav" settings="">
</ul>
<!--@EndIf-->

The conditional will never be true, and the navigation will not be rendered - but still defined.

It is a hack - but it should do the trick.

 

You must be logged in to post in the forum