Don't know if this is possible. You can call a macro that is using xslt(Other macro types is not possible) from a macro. In the example below I call a macro with alias ShowContentImage. As you can see you'll have to encode the string otherwise it will fail your xslt to save.
I did try the umbraco.library:RenderMacroContent. The function just render the content, which I guess what's the function name call :)
But my macro reading the content from richtext editor field, which contain another macro happen to be .ascx control. It does render the control without execute the code-behind. Any idea how to execute the code-behind?
My macro reading the richtexteditor field, the publisher might insert few macros into it.
umbraco.library:RenderMacroContent function able to execute properly if the richtexteditor contain xslt macro, no luck with usercontrol as it won't execute the code behind.
It will be great if it's support macro from usercontrol.
Is there anyway to achieve what your trying by using an ITemplate?
Your macro/control reading the richtextarea could contain an ITemplate, then you would be able to read the data from the RTE and use the InstantiateIn() method of ITemplate.
Other than that I'd get the Umbraco code and find out how it initiates the RTE content... and steal emulate that functionality.
Umbraco Macro Render another macro
Hi,
How to render umbraco macro from another macro?
I have umbraco macro, reading the richtexteditor from other content (which might content another macro).
Hi,
Don't know if this is possible. You can call a macro that is using xslt(Other macro types is not possible) from a macro. In the example below I call a macro with alias ShowContentImage. As you can see you'll have to encode the string otherwise it will fail your xslt to save.
Hereby the example again
<xsl:value-of select="umbraco.library:RenderMacroContent('<?UMBRACO_MACRO macroAlias="ShowContentImage" > </?UMBRACO_MACRO>', $currentPage/@id)" disable-output-escaping="yes"/>
I did try the umbraco.library:RenderMacroContent. The function just render the content, which I guess what's the function name call :)
But my macro reading the content from richtext editor field, which contain another macro happen to be .ascx control. It does render the control without execute the code-behind. Any idea how to execute the code-behind?
I think you can't. Rendering a normal Macro that uses a Usercontrol is not possible in a Macro so I think this is also the case with you scenario.
Remember that a UserControl can be loaded from another UserControl using
This might achieve what you're looking for.
My macro reading the richtexteditor field, the publisher might insert few macros into it.
umbraco.library:RenderMacroContent function able to execute properly if the richtexteditor contain xslt macro, no luck with usercontrol as it won't execute the code behind.
It will be great if it's support macro from usercontrol.
Is there anyway to achieve what your trying by using an ITemplate?
Your macro/control reading the richtextarea could contain an ITemplate, then you would be able to read the data from the RTE and use the InstantiateIn() method of ITemplate.
Other than that I'd get the Umbraco code and find out how it initiates the RTE content... and steal emulate that functionality.
is working on a reply...