Developer forum
E-mail notifications
XSLT menu inside a Paragraph template
I hope some of you are able to help me out here.
Is it possible to get a menu inside a paragraph template? I am using XSLT. I have no problems doing so this in the page template, but right now I need it to be inside a Paragraph template! How do I make the paragraph template drag out menu information? Or can I somehow go back in the XML-order? Hoping to hear from you very soon.
Best regards
Jannik Rasmussen
Replies
What you can do is using Sitemap2 - it uses the navigation system and is a module that can be attached in a paragraph.
Then you can add the sitemap to a paragraph that you call from you paragraph template using the global tag:
<!--@Global:Paragraph.Content([ID])-->
http://templates.dynamicweb.dk/TemplateTags/Dynamicweb-template-tags/General-tags/Global-template-tags.aspx
Okay,
Thank you for your reply, I'll look at the sitemap solution. :)
Therefore you can use :
<xsl:text disable-output-escaping="yes"><![CDATA[<!--@MenuTag-->]]></xsl:text>
Think I got it and for other looking for a solution:
XmlDocument doc = new Dynamicweb.Frontend.XmlNavigation(base.Pageview).XML(base.Pageview.Page.ID, 1, 5,
Dynamicweb.Frontend.XmlNavigation.Expand.All, base.Pageview.AreaID);
Hi Again
With 8.2.02 released yesterday I've made a feature so you can use a new template tag that looks like this:
<!-- @Navigation.Render(settings)--> where settings are the same as you would use in your layout files, i.e.
<!-- @Navigation.Render(startlevel:1;endlevel:3;expandmode:all)-->
This tag can be used in any template throughout the system.
BR Nicolai
Hi,
Do any of you guys have problems with the "inpath" class not being set on the first item in the menu? E.g. if I have the following structure
- Page 1
- Subpage 1.1
- Subpage 1.2
- Page 2
- Subpage 2.1
- Subpage 2.2
- Page 3
If i click on Page 1, Subpage 1.1 or Subpage 2.1, the "inpath" class is not added, but if I click on Page 2, Page 3, Subpage 1.2 or Subpage 2.2, the inpath class is added like it's supposed to.
Can we see your XML (add savexml=true in frontend and see the folder where the XSLT is located) and XSLT?
BR Nicolai
You must be logged in to post in the forum