Copied to clipboard

Flag this post as spam?

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


  • Kim Larsen 29 posts 72 karma points
    Jun 30, 2012 @ 14:01
    Kim Larsen
    0

    Macro inserted in Richtext not rendered i .NET macro.

    I have a .NET macro that builds up a tab-view and shows content from some richtext fields. In very very short the code looks like this;

    LiteralProgramText.Text = mCurrentPage.GetProperty("text").Value;

    Now the webmaster wants to easely add some more dynamic content to the page and for this I have created another .NET macro that can be used when editing the richtext. In the richtext field the macro looks as intented, but when showing it on the page the code for the macro is not parsed, instead the macro-code is just send directly to the client. I have tried changing the code to the following;

    LiteralProgramText.Text = umbraco.library.RenderMacroContent(mCurrentPage.GetProperty("text").Value, mCurrentPage.Id);

    but all what happens now is that the macro-code is completely gone when the page is sent to the client.

    How is it possible to render a macro from a richtext field inside my original .NET macro?

  • Kim Larsen 29 posts 72 karma points
    Jun 30, 2012 @ 14:50
    Kim Larsen
    0

    I can see, that if I use RenderMacroContent the macro is actually rendered, but the Page_Load event of the macro is never executed?

  • Kim Larsen 29 posts 72 karma points
    Jun 30, 2012 @ 18:23
    Kim Larsen
    0

    Problem solved - used RenderMacroContent in my main .net Macro and wrote an XSLT macro to insert in the RTE instead of the .NET macro.

Please Sign in or register to post replies

Write your reply to:

Draft