Try our conversational search powered by Generative AI!

Properties set to read only still editable in on page edit mode

Vote:
 

Hey guys,

A little background: I'm using a meta data extender class to set certain properties to read only when content loads.  When the user views the property in forms editing mode, the property is correctly set to read only and the user cannot edit the property (great!) however, when the user views the property from the on page edit mode (like a content area property) - the property can be edited from this interface, and blocks dragged in and out, etc.  What should I be doing to also stop the on page edit mode editing?

Thanks

#74228
Aug 22, 2013 15:25
Vote:
 

Not sure if it's the "correct way" but if you use MVC I would do like this. Instead of having @Html.PropertyFor(x => x.Prop), I would simply write @Html.EditorFor(x => x.Prop)/@Html.TextBoxFor(x => x.Prop) (and so on). This way Epi won't read it as an on page editable property.

#74355
Edited, Aug 26, 2013 9:14
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.