Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi Everyone,
I am trying something, which I am not sure is possible with inline xslt.
I would like to test the value of a page field and based on that output certain html. For example:
<umbraco:Item runat="server" field="useSimpleHeader" xslt="<xsl:if test='{0}=1'/>ablablablalbalalbalab</xsl:if>" xsltDisableEscaping="true"/>
But whatever xslt element I try to put in the xslt tag, it seems that it is not taken into consideration.
Is it possible to do that at all?
Thanks
You can't use it that way.
Why not just create a macro?
Hi Daniel,
Thanks for letting me know.
I already had a macro but wanted to explore my options.
Just so you know as your exploring your options, you could do this inline with Razor.
http://umbraco.com/help-and-support/video-tutorials/umbraco-fundamentals/razor/inline-razor-script
Rich
@Rich: Great answer.. forgot about Razor as an option..
Hi Milen
You can read some more about inline xslt in this wiki: http://our.umbraco.org/wiki/reference/templates/umbracoitem-element/inline-xslt
But the Razor option is also a great oportunity.
/Kim A
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Is it possible to use xslt elements in inline xslt?
Hi Everyone,
I am trying something, which I am not sure is possible with inline xslt.
I would like to test the value of a page field and based on that output certain html. For example:
But whatever xslt element I try to put in the xslt tag, it seems that it is not taken into consideration.
Is it possible to do that at all?
Thanks
You can't use it that way.
Why not just create a macro?
Hi Daniel,
Thanks for letting me know.
I already had a macro but wanted to explore my options.
Just so you know as your exploring your options, you could do this inline with Razor.
http://umbraco.com/help-and-support/video-tutorials/umbraco-fundamentals/razor/inline-razor-script
Rich
@Rich: Great answer.. forgot about Razor as an option..
Hi Milen
You can read some more about inline xslt in this wiki: http://our.umbraco.org/wiki/reference/templates/umbracoitem-element/inline-xslt
But the Razor option is also a great oportunity.
/Kim A
is working on a reply...