Genericsetup 配置文件使用技巧

Genericsetup 配置文件使用技巧

在Plone中,内容类型的相关信息是由xml格式的GenericSetup文件配置的。
下面的样例代码展示了两种配置技巧:
1、为已有的内容类型增加视图([backcolor=Yellow]05~07行代码)[/backcolor]
2、在toolbar面板中增加 Action (13~17行代码)

<?xml version="1.0"?>
<object name="File" meta_type="Dexterity FTI" i18n:domain="plone"
   xmlns:i18n="http://xml.zope.org/namespaces/i18n">

  <property name="view_methods" purge="false">
  <element value="file_preview"/>
 </property>
 <action title="View" action_id="view" category="object" condition_expr=""
    icon_expr="" link_target="" url_expr="string:${object_url}/view"
    visible="True" i18n:attributes="title">
  <permission value="View"/>
 </action>
 <action title="External Edit" action_id="externaledit" category="object" condition_expr=""
    icon_expr="" link_target="" url_expr="string:${object_url}/file_review"
    visible="True" i18n:attributes="title">    
  <permission value="Modify portal content"/>
 </action>
</object>



设置