How to exclude images from the default Plone navigation tree

I notice that if I create a page and add and upload an image to include in it, by default it is included in site navigation. How can I stop this automatically?

+7
source share
3 answers

Option 1

There is a Plone parameter that indicates which types are included in the navigation. Go to ZMI> portal_propeties> navtree_properties> metaTypesNotToList and add the image there.

Option 2

For each image, select the "Exclude in navigation" checkbox on the "Image Settings" tab.

+9
source

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> 
+3
source

You have options for Navigation in the Site Setup menu. Uncheck the image for the displayed content types and the images are no longer displayed in site navigation and site maps.

+1
source

All Articles