Copied to clipboard

Flag this post as spam?

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


  • Simon Dingley 1474 posts 3431 karma points c-trib
    Jan 21, 2012 @ 08:36
    Simon Dingley
    0

    Razor Macro Rendering as <?UMBRACO_MACRO param="6KBslTTw-Nk" macroAlias="MyMacroAlias" />

    I've created a very simple Razor macro to insert a YouTube IFrame embed in the RTE, it is set to be available in the editor but not to render the contents however when published all I am getting in the output is:

    <?UMBRACO_MACRO myParam="xxxxxxxx" macroAlias="MyMacroAlias" />

    Previously I've only really used Razor macros with the FileLocation attribute rather than actually creating a Macro through the UI so not come across this one before - any ideas?

  • Simon Dingley 1474 posts 3431 karma points c-trib
    Jan 21, 2012 @ 08:44
    Simon Dingley
    0

    I have just realised the error in my ways, it was because I was outputting content using the uSiteBuilder syntax <%= CurrentContent.PageOverview %> and so the content was being rendered literally and the macro tags were not being parsed.

Please Sign in or register to post replies

Write your reply to:

Draft