默认情况下如何从Plone导航树中排除图像
我注意到,如果我创建一个页面并添加和上传一个图像以包含在其中,默认情况下,它会包含在站点导航中。我如何才能阻止这种情况自动发生?选项1 有一个Plone设置,告诉导航中包括哪些类型。进入ZMI>portal_properties>navtree_properties>MetatypesNotList并在那里添加图像 选项2默认情况下如何从Plone导航树中排除图像,plone,Plone,我注意到,如果我创建一个页面并添加和上传一个图像以包含在其中,默认情况下,它会包含在站点导航中。我如何才能阻止这种情况自动发生?选项1 有一个Plone设置,告诉导航中包括哪些类型。进入ZMI>portal_properties>navtree_properties>MetatypesNotList并在那里添加图像 选项2 对于每个图像,在图像的“设置”选项卡上切换复选框“在导航中排除” 如果需要在容器的基础上这样做,可以使用中包含的内容规则 只需将其添加到BuildOut并手动配置,将Excl
对于每个图像,在图像的“设置”选项卡上切换复选框“在导航中排除” 如果需要在容器的基础上这样做,可以使用中包含的内容规则 只需将其添加到BuildOut并手动配置,将ExcludeFromNav字段设置为True 另一种方法是在项目概要文件中包含contentrules.xml,如下所示:
<?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>
形象
真的
您可以在站点设置
菜单中选择导航
。
删除显示内容类型的图像上的勾号,并且图像不再显示在站点导航和站点地图上