Developer forum

Forum » Templates » Layout navigation in paragraph

Layout navigation in paragraph


Reply
 Hi,

I would like to create menus in the design & layout parapraphs. But it doesn't seem to work.
I have this code in a paragraph bu id does not display the subpages for the tha page with parentid 108:

<ul class="dwnavigation" id="StoreLocate" settings="parentid:108;">
<li><a href="#">skåne län</a></li>
<li><a href="#">vätra gätalands län</a></li>
<li><a href="#">Örebro län</a></li>
<li><a href="#">Östergötland</a></li>
                </ul>
Regards / Aki
 

Replies

 
Nicolai Høeg Pedersen
Reply
You cannot insert navigations directly in paragraph templates.

But insert this in you layout template:
<div style="display:none;">
<ul class="dwnavigation" id="StoreLocate" settings="parentid:108;">
<li><a href="#">skåne län</a></li>
<li><a href="#">vätra gätalands län</a></li>
<li><a href="#">Örebro län</a></li>
<li><a href="#">Östergötland</a></li>
</ul>
</div>

And then put this tag in you paragraph template:
<!--@DwNavigation(StoreLocate)-->
 
Daniel Williams
Reply
Hey Nicholai - Does that solution still work? Because I can't get it to.
 
Nicolai Høeg Pedersen
Reply

It does not seem to be possible in DW 8 due to the changes in the way the template engine processes templates.

 

I will look into it and see if we can come up with a solution.

 
Mikkel Toustrup Olsen
Reply

Hi Nicolai, did you come across a solution for this? - I am currently having the same issue where I need to format a navigation on a specific paragraph :-)

/MikkelTO

 
Mikkel Ricky
Reply
This post has been marked as an answer

You can use <!--@Navigation.Render(…)--> to render a navigation in any template. See http://templates.dynamicweb-cms.com/TemplateTags/Dynamicweb-template-tags/General-tags/Global-template-tags/Navigation-Render().aspx for details.

Best regards,
Mikkel

Votes for this answer: 1

 

You must be logged in to post in the forum