Wednesday, 15 April 2015

Disable web Editing in Sitecore : Page Editor Mode

if  we want the field to be non editable in Page Editor mode

<sc:Text Field="Your feild " DisableWebEditing="true" runat="server" />

FieldRenderer.Render(HeadingType, "Your Feild", "disable-web-editing=true");

@Html.Sitecore().Field("Field Name", new { DisableWebEdit = true })

1 comment:

  1. If I do this for a field of type image like this:
    @Html.Sitecore().Field("Image", new { DisableWebEdit = true })
    I get:
    < img src="/-/media/Image.jpg" disablewebedit="True">
    Why is disablewebedit visible?

    equivalent is not happening with webforms.