I have created a simple .NET User Contro macro - actually it contains absolutely nothing at the moment - and I need to place in an XSLT macro but no matter how I try to implement the macro in my XSLT the entire website crashes the moment i save my XSLT-document. When the site is back online the XSLT is not saved but instead a new tempory XSLT-file is created.
Is it not possible to put a .NET macro inside an XSLT document (I know that it is possible to put an XSLT macro inside an XSLT document) or what am I doing wrong in my current code;
Ok - but is it instead possible to send some page-specific variables to the macro if i place the macro in my template? When working with XSLT I have easy access to the variables of the current page (this is why i tried to place the .NET macro inside the XSLT) but what if I place it in the template instead?
.NET User Control macro to be used in XSLT
I have created a simple .NET User Contro macro - actually it contains absolutely nothing at the moment - and I need to place in an XSLT macro but no matter how I try to implement the macro in my XSLT the entire website crashes the moment i save my XSLT-document. When the site is back online the XSLT is not saved but instead a new tempory XSLT-file is created.
Is it not possible to put a .NET macro inside an XSLT document (I know that it is possible to put an XSLT macro inside an XSLT document) or what am I doing wrong in my current code;
<xsl:variable name="macro">
<![CDATA[<?UMBRACO_MACRO macroAlias="mTestUserControl" runat="server"></?UMBRACO_MACRO>]]>
</xsl:variable>
<xsl:value-of select="umbraco.library:RenderMacroContent($macro, $currentPage/@id)" disable-output-escaping="yes"/>
Also, when the User Control is done I need to pass some parameters to it but how?
Hi Kim
As far as I know, you can't use a .NET macro inside a XSLT file. It simply doesn't work.
In this post others have the same opinion.
/Kim A
Ok - but is it instead possible to send some page-specific variables to the macro if i place the macro in my template? When working with XSLT I have easy access to the variables of the current page (this is why i tried to place the .NET macro inside the XSLT) but what if I place it in the template instead?
nevermind - solved :)
Tnx for your reply!
is working on a reply...