Developer forum
E-mail notifications
Paragraph content in xslt template
Tomasz Lach
Posted on 12/03/2012 14:59:19
Hello. I have a problem with xslt menu template. I want to return a paragraph text in a specific location in xslt (in attachment, location is a comment). This text must be from a specific paragraph whose name is "Description" (this paragraph is also in section "Description area") from the current (active) page. I try many trick but without success. Thank You for help.
Replies
Vladimir
Posted on 15/03/2012 04:41:28
This post has been marked as an answer
Hi Tomasz,
I think that you can use <!--@Global:Paragraph.Content(id)--> tag.
But problem how to get needed paragraph id...
What if you set for page's property NavigationTag the id of needed paragraph?
In this case your xslt might look like this:
Best regards,
Vladimir
I think that you can use <!--@Global:Paragraph.Content(id)--> tag.
But problem how to get needed paragraph id...
What if you set for page's property NavigationTag the id of needed paragraph?
In this case your xslt might look like this:
<xsl:if test="@NavigationTag>'0'"> <xsl:comment>@Global:Paragraph.Content(<xsl:value-of select="@NavigationTag"/>)</xsl:comment> </xsl:if>
Vladimir
Votes for this answer: 0
Tomasz Lach
Posted on 19/03/2012 11:23:05
Hi Vladimir,
Thanks for reply.
I try to connect this param with this solution http://developer.dynamicweb-cms.com/forum/templates/globalpage/paragraph.content%28%29.aspx, but this don't work too. Temporary I was use a jQuery to replace a div content. How can I return all tags which can I use in xslt? A &SaveTemplateXML=true don't work (or I do something wrong).
Thanks for help.
Thanks for reply.
<
xsl:value-of
select
=
"@NavigationTag"
/>
returns nothing.I try to connect this param with this solution http://developer.dynamicweb-cms.com/forum/templates/globalpage/paragraph.content%28%29.aspx, but this don't work too. Temporary I was use a jQuery to replace a div content. How can I return all tags which can I use in xslt? A &SaveTemplateXML=true don't work (or I do something wrong).
Thanks for help.
Vladimir
Posted on 20/03/2012 01:49:22
Try to use &SaveXML=true parameter - xml file(s) should appears in \Files\Templates\Designs\YourTemplate\Navigation folder
I think you find
Best regards,
Vladimir
I think you find
@NavigationTag in
obtained xml :)Best regards,
Vladimir
Tomasz Lach
Posted on 20/03/2012 09:00:46
Thanks for help. &SaveXML=true is working, but in obtained xml I don't find a
Best regards,
Tomasz
@NavigationTag.
I think that I don't understand Your first answer:) What this is mind: "What if you set for page's property NavigationTag the id of needed paragraph?" I must manualy enter a paragraph ID somewhere in pages properties? If yes, how can I do this?:) Sorry if I don't know a DynamicWeb structure and options but I'm just started working in DW. Thanks for reply.Best regards,
Tomasz
Vladimir
Posted on 20/03/2012 11:07:09
Hi Tomasz!
Yes, the only way that I imagine to transfer requered paragraphID it is pass manualy throught page's NavigationTag.
Page properties are accessed from backend, when you right click on page, then appeared a menu with Properties option.
Then Options tab -> Navigation button (in ribbon menu)
And Id of paragraph is showed in url in the bottom of a brouser
Kind regards,
Vladimir
Yes, the only way that I imagine to transfer requered paragraphID it is pass manualy throught page's NavigationTag.
Page properties are accessed from backend, when you right click on page, then appeared a menu with Properties option.
Then Options tab -> Navigation button (in ribbon menu)
And Id of paragraph is showed in url in the bottom of a brouser
Kind regards,
Vladimir
Tomasz Lach
Posted on 20/03/2012 11:39:24
Hi Vladimir,
This was very helpful. Thanks!
Best regards,
Tomasz
This was very helpful. Thanks!
Best regards,
Tomasz
You must be logged in to post in the forum