How to add a type "MyType" to the typesUseViewActionInListings
property of the site_properties
property in the portal_properties
tool?
Using a propertiestool.xml file with GenericSetup as the following will modify the existing/default types (Image, File) to only (MyType). I need instead add MyType to the existing.
<?xml version="1.0"?>
<object name="portal_properties" meta_type="Plone Properties Tool">
<object name="site_properties" meta_type="Plone Property Sheet">
<property name="typesUseViewActionInListings" type="lines">
<element value="MyType"/>
</property>
</object>
</object>
One could think adding all types (existing and new). This is won't suffice for us since we do not want to assume which types are already in typesUseViewActionInListings
<element value="File"/>
<element value="Image"/>
<element value="MyType"/>
purge="False"
does the trick!
<?xml version="1.0"?>
<object name="portal_properties" meta_type="Plone Properties Tool">
<object name="site_properties" meta_type="Plone Property Sheet">
<property name="typesUseViewActionInListings" type="lines" purge="False">
<element value="MyType"/>
</property>
</object>
</object>