How to send variable through to Macro XSL from usercontrol?
Hi there
I've created a custom section inside Umbraco and I want to pass some XML through to an XSLT file for styling, to do this I'm calling a Macro and want to pass the XML in as a parameter, but as its a Server side variable, not sure how to send it through?
Firstly, I've never tried to dynamically load in XML directly into a macro via a property field ... and even if it did work, it would parse it as a string value (not an XmlDocument).
My advice would be to store the XmlDocument (or rather an XPathNodeIterator) in a HTTP item... which you can then retrieve within the XSLT using the following method:
How to send variable through to Macro XSL from usercontrol?
Hi there
I've created a custom section inside Umbraco and I want to pass some XML through to an XSLT file for styling, to do this I'm calling a Macro and want to pass the XML in as a parameter, but as its a Server side variable, not sure how to send it through?
E.G <umbraco:Macro Alias="MyMacro" Info="<%=XML%>" runat="server" />
Any help appreciated!
Thanks
Hi BaconBestNz, (what a name!)
Firstly, I've never tried to dynamically load in XML directly into a macro via a property field ... and even if it did work, it would parse it as a string value (not an XmlDocument).
My advice would be to store the XmlDocument (or rather an XPathNodeIterator) in a HTTP item... which you can then retrieve within the XSLT using the following method:
Cheers, Lee.
is working on a reply...