Have you tried UN escaping the special characters, as I have the feeling they only recommend encoding them as documentation assumes you are calling the method from XSLT, which would require them to be escaped, but you are calling it from code.
Just for information I took the liberty to copy the content from the old reference into the new reference here on our. Then information can now be found at http://our.umbraco.org/wiki/reference/umbracolibrary/rendermacrocontent also. (Asuming that some day the old umbraco wiki site will no longer be around)...
Parse XML through XSLT Engine in /base
Hi
I'm looking to parse some XML through the Umbraco XSLT engine from a .net class thats accessed via the /base rest interface.
So far i've tried using
but this just re-renders the <umbraco:macro~> code
Is there an easy way to access the XSLT Macro Engine via the API?
Cheers
Jon
Looks like you need some escaping, and the old v3 syntax.
Check http://en.wikibooks.org/wiki/Umbraco/Reference/umbraco.library/RenderMacroContent for details.
cheers,
doug.
Hi Doug
Thanks for the speedy reply. Just tested the old v3 code and it's still just rendering the content I placed to be converted. e.g
This just renders "<?UMBRACO_MACRO macroAlias="macroalias" ></?UMBRACO_MACRO>
Curious!
Jon
Hey Jon.
Have you tried UN escaping the special characters, as I have the feeling they only recommend encoding them as documentation assumes you are calling the method from XSLT, which would require them to be escaped, but you are calling it from code.
umbraco.library.RenderMacroContent("<?UMBRACO_MACRO macroAlias=\"macroalias\" ></?UMBRACO_MACRO>", id);
Matt
Spot on Matt. That worked perfectly. Now i just need to work out how to get currentPage working ;)
Cheers
Ah yes, of course. Thanks, Matt. What a team! :)
cheers,
doug.
Just for information I took the liberty to copy the content from the old reference into the new reference here on our. Then information can now be found at http://our.umbraco.org/wiki/reference/umbracolibrary/rendermacrocontent also. (Asuming that some day the old umbraco wiki site will no longer be around)...
/Jan
@Jon no problem
@Doug Absolutley! #h5wr
@Jan - Good idea. I had seen that wikibooks post but ignored it as it was very old. Having it in the wiki validates its uses again for me. Cheers
is working on a reply...