再次带着一个克隆问题回来。
我安装了 Plone 4,我需要在顶部而不是底部显示 Document 操作图标。无法使其正常工作。有人可以帮忙吗?
如果您只需要移动该 viewlet(具有相同的类和模板),首先您必须将具有相同类的 viewlet 注册到您想要的 viewletmanager(假设为 ex. plone.app.layout.viewlets.interfaces.IAboveContentBody
):
<browser:viewlet
name="plone.abovecontenttitle.documentactions"
manager="plone.app.layout.viewlets.interfaces.IAboveContentBody"
class="plone.app.layout.viewlets.content.DocumentActionsViewlet"
permission="zope2.View"
/>
然后将其添加到您的 genericsetup 配置文件(文件viewlets.xml
)中:
<?xml version="1.0"?>
<object>
<order manager="plone.abovecontentbody" skinname="Plone Default">
<!-- this will place your viewlet before all the others.
you can also use a viewlet's name for a relative position -->
<viewlet name="plone.abovecontenttitle.documentactions" insert-before="*"/>
</order>
<hidden manager="plone.belowcontentbody" skinname="Plone Default">
<viewlet name="plone.abovecontenttitle.documentactions"/>
</hidden>
</object>
更多信息: