Hi, can this be done and how?
Developer forum
Can I use a dwnavigation on a product template?
Replies
You must be logged in to post in the forum
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
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