Copied to clipboard

Flag this post as spam?

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


  • Sjors Pals 617 posts 270 karma points
    Mar 17, 2011 @ 17:17
    Sjors Pals
    0

    NodeFactory and Editor Macro

    I have the following problem:

    String Artikel = Node.GetCurrent().GetProperty("artikel").Value;

    Offcourse this works fine, but any Macros inserted in the rich text editor are removed, is there an option to retrieve the rendered content of an item by using the api?

  • Sjors Pals 617 posts 270 karma points
    Mar 17, 2011 @ 17:29
    Sjors Pals
    0

    Mmmm also found another nasty thing, media is also not displaying since it returns something like:

    ~/media/103299/3_pensioen_pijlers_497x320.jpg
  • Alex 78 posts 136 karma points
    Mar 17, 2011 @ 18:33
    Alex
    1

    If you are using Razor you can try this:

    @Html.Raw(umbraco.library.RenderMacroContent(Model.artikel.ToString(), Model.Id));

    You should be able to do something similar in a user control using Node, but i've not tried it.

  • Sjors Pals 617 posts 270 karma points
    Mar 17, 2011 @ 18:51
    Sjors Pals
    0

    Thanks, that did the trick :)

    string Artikel = Node.GetCurrent().GetProperty("artikel").Value;
    Artikel = umbraco.library.RenderMacroContent(Artikel, Node.GetCurrent().Id);

Please Sign in or register to post replies

Write your reply to:

Draft