How do you get the macro to render when you need to output the content in xslt?
In a template this works fine: <umbraco:Item runat="server" field="bodyText" />
In a xslt this renders or removes the actual macro tag depending on output-escaping: <xsl:value-of select="$currentPage/data[@alias='bodyText']" disable-output-escaping="yes"/>
I assume the macro is inserted into your Rte body text. Is the macro a user control or xslt? As far as I know rendering a usercontrol macro from another macro does not work.
Yes, I've inserted the macro (oEmbed/Easy Video) in the RTE/tiny mce, and I'm using a xslt/macro to display the content since I wanted to do some xslt stuff (xsl:if/when etc).. is it maybe possible to use umbraco.library:RenderMacroContent? Or maybe I'll have to go about this another way not using xslt...
Unfortunately if it's a user control macro, RenderMacroContent won't work. It has to do with the lifecycle of the page loading. I would look for another solution.
Render macro in xslt
How do you get the macro to render when you need to output the content in xslt?
In a template this works fine:
<umbraco:Item runat="server" field="bodyText" />
In a xslt this renders or removes the actual macro tag depending on output-escaping:
<xsl:value-of select="$currentPage/data[@alias='bodyText']" disable-output-escaping="yes"/>
How do you get the macro to render in xslt?
Thanks,
Magnus
Magnus,
I assume the macro is inserted into your Rte body text. Is the macro a user control or xslt? As far as I know rendering a usercontrol macro from another macro does not work.
-Chris
Hi Chris,
Yes, I've inserted the macro (oEmbed/Easy Video) in the RTE/tiny mce, and I'm using a xslt/macro to display the content since I wanted to do some xslt stuff (xsl:if/when etc).. is it maybe possible to use umbraco.library:RenderMacroContent? Or maybe I'll have to go about this another way not using xslt...
Regards,
Magnus
Unfortunately if it's a user control macro, RenderMacroContent won't work. It has to do with the lifecycle of the page loading. I would look for another solution.
-Chris
is working on a reply...