Copied to clipboard

Flag this post as spam?

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


  • andrew shearer 510 posts 659 karma points
    Mar 27, 2012 @ 05:56
    andrew shearer
    0

    razor and the simpleEditor

    does anyone know how to successfully get content out of a property thats based on the simple editor?

    ive tried @Model.mySimpleEditor and @Html.Raw(@Model.mySimpleEditor) and a few other things, but inevitably i get:

    umbraco.MacroEngines.DynamicXml

    im on 4.7.1.1

    thanks

     

  • Evan Jardine 108 posts 168 karma points
    Mar 27, 2012 @ 07:24
    Evan Jardine
    0

    Hi Andrew

    With 4.7.1.1 I've used both;

    @Html.Raw(Model.GetProperty("mySimpleEditor").Value)
    @Html.Raw(Model.mySimpleEditor)

    Try taking out the @ symbol in front of Model.

    Cheers

    Evan

  • andrew shearer 510 posts 659 karma points
    Mar 27, 2012 @ 07:54
    andrew shearer
    0

    hi Evan, thanks for the info. Yeah, i ended up using the GetProperty method.

    the problem was down to the content, certain content was being treated by Dynamic as an xml type and other content was being treated as an html object type. To Avoid the Dynamic aspect i went with .GetProperty and just always deal with it as a string representation of html (which is what i want anyway).

    :-)

Please Sign in or register to post replies

Write your reply to:

Draft