Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

plone

viewlets

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.

like image 650
sabs6488 Avatar asked Oct 17 '25 12:10

sabs6488


1 Answers

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:

  • http://plone.org/documentation/kb/customization-for-developers/viewlets
  • http://collective-docs.readthedocs.org/en/latest/views/viewlets.html
like image 94
Giacomo Spettoli Avatar answered Oct 19 '25 12:10

Giacomo Spettoli



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!