if you need to do this based on the container, you can use the content rule included in sc.contentrules.metadata .
just add it to your buidout and configure it manually to set the ExcludeFromNav field to True .
an alternative way to do this is to include contentrules.xml in your project profile something like this:
<?xml version="1.0"?> <contentrules purge="True"> <rule name="exclude-on-add" title="Images are excluded from navigation when added" description="" enabled="True" event="zope.lifecycleevent.interfaces.IObjectAddedEvent" stop-after="False"> <conditions> <condition type="plone.conditions.PortalType"> <property name="check_types"> <element>Image</element> </property> </condition> </conditions> <actions> <action type="sc.contentrules.actions.ExcludeFromNav"> <property name="exclude">True</property> </action> </actions> </rule> <assignment name="exclude-on-add" bubbles="True" enabled="True" location="/your-container"/> </contentrules>
hvelarde
source share