I have a model ArticleItem which has some fields that I populate with some Business Logic.

Now on the view where I return ArticleItem I want to render a RTE content so that it is Page Editor friendly

@Html.Sitecore().Field("Article Body", @Model.ArticleItem)

is not working.

Does it only works with Sitecore.Items.Item?

If I want to use a custom Model instead how can I render RTE so it is Page Editor mode friendly?

I cannot use the context item in this case as I am rendering from a multilist inside the Context Item.

3 Answers 3


@Html.Sitecore().Field only works with real items and it sounds like Model.ArticleItem is not a real Sitecore Item.

What you want to do is render the Sitecore field as HTML in your model and render that.

// get your sitecore item
var item = RenderingContext.Current.ContextItem;

// get the sitecore editor html (will only render the data if not in edit mode) 
var fieldHtml = SC.Web.UI.WebControls.FieldRenderer.Render(item, "title");

// bind the fieldHtml to a HtmlString field on your model
MyModel.TitleField = fieldHtml

public class MyModel
    public HtmlString TitleField { get; set; }

Now in you view you can just render the model's TitleField property and you will get the RTE editor you want in page.

  • Thanks! this work. What do I do for Images and MultList/TreeList any thoughts?
    – Renuka
    Commented Apr 29, 2019 at 22:54

In your controller (or service), you could also add the Sitecore.Items.Item on the view model that you send to your view and then use that item to render the content and Experience Editor functionality:


var contextItem = RenderingContext.Current.ContextItem;

var articleItem = // get article item from multilist on contextItem;

var viewModel = new ArticleViewModel
                        /// ... other business fields ...
                        ArticleItem = articleItem;


@Html.Sitecore().Field("Article Body", @Model.ArticleItem)
  • this is what I am doing currently but it does not work because apparently it works only with Sitecore Item and not Model Item unless handled with FieldRender.Render
    – Renuka
    Commented Apr 30, 2019 at 17:14
  • Yes, that's right; articleItem will need to be the actual Sitecore.Items.Item. Commented Apr 30, 2019 at 17:14



in Model.cs

public string Article
            get { return Templates.Models.Articles.Article;}
  • this does not work.
    – Renuka
    Commented Apr 30, 2019 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.