Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Stig Kulvedrøsten 48 posts 69 karma points
    Mar 16, 2011 @ 15:27
    Stig Kulvedrøsten
    0

    Render macro inside another macro. Possible?

    I've got a macro with a .net usercontrol that renders child nodes and a rich-text-editor property from each of them. Inside these rich-text-editor properties there might be a macro. Anyway to render that inner macro? Now the output of the inner macro is just blank...

    Stig

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Mar 16, 2011 @ 16:05
    Ismail Mayat
    0

    stig,

    It is possible to call xslt macro from xslt macro using RenderMacro xslt extension method but i am fairly certain you cannot do it from .net macro

    Regards

    Ismail

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Mar 16, 2011 @ 17:14
    Hendy Racher
    1

    Hi Stig

    You can call a .Net macro and an XSLT macro from a .Net macro (see Tim's blog post on Adding an Umbraco macro dynamically to a user control), but can only call XSLT macros from other XSLT macros (see the RenderMacroContent wiki page)

    I think to process the macros embedded within a rich-text-editor, you'll have to search for the Macro delimiter <?UMBRACO_MACRO  macroAlias="..." /> within the rich-text-editor property and then dynamically add it.

    HTH,

    Hendy

  • Stig Kulvedrøsten 48 posts 69 karma points
    Mar 16, 2011 @ 17:34
    Stig Kulvedrøsten
    0

    Great! Thanks alot!

    I also have to search for each and one of the macro parameters I suppose. They aren't stored in the database somehow?
    To bad my regex skills sucks.... :p

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies