Hi, can this be done and how?
Developer forum
E-mail notifications
Can I use a dwnavigation on a product template?
Kim Søjborg Pedersen
Replies
Morten Bengtson
Posted on 06/07/2017 15:39:19
This post has been marked as an answer
Hi Kim,
Yes, but the solution depends on which kind of template you are using...
Razor templates (.cshtml)
Use the RenderNavigation method in any template.
@RenderNavigation(new { id = "mynav"});
HTML templates (.html)
Navigations must be specified in the layout template. But, but, but...
You should be able to add the dwnavigation markup to your layout template (or master) and then use a snippet to move it inside your product template at render time.
Layout template | <!--@SnippetStart(mysnippet)--> <ul class="dwnavigation" id="mynav"></ul> <!--@SnippetEnd(mysnippet)--> |
Product template | <!--@Snippet(mysnippet)--> |
Does that solve your problem?
BR,
Morten
Votes for this answer: 1
Kim Søjborg Pedersen
Posted on 08/07/2017 11:49:59
Hi Morten,
Thanks, It's Razor, I missed the @RenderNavigation so I think I will look into how to use that, it sounds like the right choise.
Regards
Kim
You must be logged in to post in the forum