cancel
Showing results for 
Search instead for 
Did you mean: 

Make a component attribute read-only in SmartEdit

phoude
Participant

Hi,

is there a way to make a CMS Component attribute read-only only in SmartEdit? I want to display the information but I don't want the SmartEdit user to change it. It is ok to change it in Backoffice or from the code but not SmartEdit.

Pascal

View Entire Topic
adiputera
Active Participant

Hi,

You can achieve this by adding this to any spring.xml file (If you have custom smartedit extension, add it to your customsmartedit-spring.xml, otherwise you can add it to the core-spring.xml, webservices-spring.xml, or other spring.xml that you like if you don't have a custom smartedit extension)

<bean class="de.hybris.platform.cmsfacades.types.service.impl.DefaultComponentTypeAttributeStructure" 
p:typecode="SomeComponent"
p:qualifier="someAttributeName">
<property name="populators">
<set>
<ref bean="nonEditableComponentTypeAttributePopulator" />
</set>
</property>
</bean>