How does the value for the property with alias = 'TicketPriceDisclaimer' look like?
First parameter to RenderMacroContent requires you to pass in the macro syntax as you'd normally do when using it from a template (be it in v3 syntax). Find a sample below
Call Macro within a XSLT
Hi all,
I'm trying to call a macro from within an XSL page, the macro calls another XSL, I can't seem to get it to work, could you help?
Here is my simple XSL:
<xsl:variable name="tpd" select="$currentPage/data [@alias = 'TicketPriceDisclaimer']"/> <xsl:choose> <xsl:when test="string-length($tpd)=0"> Booking & transaction fees may apply, see venue website for details. </xsl:when> <xsl:otherwise> <xsl:value-of select="$tpd"/> </xsl:otherwise> </xsl:choose>I'm trying to call it in another XSLT page here:
Without success, could you advise on where I am going wrong?
Thanks
HI Darryl,
How does the value for the property with alias = 'TicketPriceDisclaimer' look like?
First parameter to RenderMacroContent requires you to pass in the macro syntax as you'd normally do when using it from a template (be it in v3 syntax). Find a sample below
Hope this helps.
Do be aware of the fact that you can't render a macro that references a user control from xslt!!
Regards,
/Dirk
Hi Darryl
I'm just wondering if your problem could be solved using either xsl:import or xsl:include (can never remember the difference between those two)?
/Jan
No parameters in TicketPriceDisclaimer, however you got me going in the right direction, thank you!
<xsl:variable name="Node" select="$currentPage" /> <xsl:variable name="macro"> <xsl:text><?UMBRACO_MACRO macroAlias="TicketPriceDisclaimer" </xsl:text> <xsl:text>"></?UMBRACO_MACRO></xsl:text> </xsl:variable> <xsl:value-of select="umbraco.library:RenderMacroContent($macro, $Node/@id)" disable-output-escaping="yes" />is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.