sabs6488
sabs6488

Reputation: 467

How to move the documentactions viewlet from a viewletmanager to another?

Once again back with a Plone question.

I have Plone 4 installed and I need to show the Document action icons at the top instead of bottom. having trouble in getting this to work. can someone help.

Upvotes: 4

Views: 291

Answers (1)

Giacomo Spettoli
Giacomo Spettoli

Reputation: 4496

If you just need to move that viewlet (with same class and template), first you have to register a viewlet with same class to your desired viewletmanager (let's say for 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"
    />

and then add this in your genericsetup profile (file 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>

More info:

Upvotes: 5

Related Questions