Thursday, October 30, 2014

Sitecore MVC disable web edit of fields output on page

When you output a field to a page, in the case of a title field going into the head as the page title for instance. When in page editor more, that filed will appear as editable - and in the case of meta tags mess up the look of the page editor and put code as the page title.

You can disable web editing on a case by case basis for fields with the following code:
@Html.Sitecore().Field("Field Name", new { DisableWebEdit = true })

No comments:

Post a Comment