The first statement sucessfully executes the code within ModuleImpressionsM5.cshtml
The second statement is supposed to render out an old xslt macro, with alias 'Modules'. However, the xslt macro doesn't render and instead, the word 'Modules' is simply written to the page. In fact, whatever is written as the 'MacroAlias' property of RenderMacroContent is just written directly to page. FYI - Wrapping the output in Html.Raw() makes no difference.
RenderMacroContent
Hi, I'm in the process of converting a load of old xslt into razor and I'm having some trouble running an xslt macro from within a razor file:
The first statement sucessfully executes the code within ModuleImpressionsM5.cshtml
The second statement is supposed to render out an old xslt macro, with alias 'Modules'. However, the xslt macro doesn't render and instead, the word 'Modules' is simply written to the page. In fact, whatever is written as the 'MacroAlias' property of RenderMacroContent is just written directly to page. FYI - Wrapping the output in Html.Raw() makes no difference.
Please help!
Thanks in advance,
Billy
I have tried:
but no luck. I just get the first parameter string written to page. I'm really stuck with this!
Thanks,
Billy
tried:
umbraco.library.RenderMacroContent("<?UMBRACO_MACRO macroAlias=\"macroalias\" ></?UMBRACO_MACRO>", id);
?
http://our.umbraco.org/forum/developers/api-questions/16387-call-and-render-macro-from-base?p=0#comment61064
Jonas is a STAR!
Thanks
Bill
alternativly you could use my pacakge http://our.umbraco.org/projects/website-utilities/razor-components
it uses a simple RenderPage style syntax to rendering macro from inside other Razor macros.
is working on a reply...