Plone 3.0 templates: Customizing the document actions
Posted on fredag, februar 13, 2009 @ 18:35:58 by david
In Plone 2.5, the document actions (print this, send this), are located at the top of each page as a link with an icon. In Plone 3.0 the document actions are now at the bottom of the page as a link without an icon.
So how do I move the links to the top and get the icons back?
Moving the Plone document action links (Plone 3.1.6)
- Go into the ZMI (Zope Management Interface)
- Open the portal_actions folder
- Open the folder for document_actions
- Use the checkbox for the action you want to move, and select either up, down, top, or bottom.
Doesnt quite work, I see.
UPDATE Feb 11, 2009
This only moves the icons or links around inside the document_actions area itself... thats no help.
Problem with working through the web:
Some customizations of components aren't possible (e.g. can't move viewlets between viewlet managers)
Ref. the Plone Theme Manual - 6.8.15. Document Actions
It looks like it may have to be done in the product, so its still an ongoing investigation...
UPDATE Feb 13, 2009 (Friday the 13th) :)
Customizing in your own product - This is the only way to do it I guess. Not all that easy if you ask me.
Thanks again to Joel David - @jlnd
Using Icons with the Plone document action links (Plone 3.1.6) - part 1
- Go into the ZMI (Zope Management Interface)
- Open the portal_actions folder
- Open the folder for document_actions
- Open the print (Print this) item
- Add "string:$portal_url/print_icon.gif" for Icon (Expression)
- Do the same for Send to, RSS and the others to use the icons that come with Plone 3.x
Using Icons with the Plone document action links (Plone 3.1.6) - part 2
- Go into the ZMI (Zope Management Interface)
- Open portal_view_customizations
- Under Zop.interface.Interface, open plone.abovecontenttitle.documentactions
- Click on Customize and replace this code:
<a href="" tal:attributes="href daction/url; title daction/description" tal:content="daction/title"></a>
With this code (standard Plone install)
<a href="" tal:attributes="href daction/url; title daction/description">
<img tal:condition="daction/icon" tal:attributes="src daction/icon; alt daction/title; title daction/title" />
<tal:action tal:condition="not:daction/icon" tal:content="daction/title" i18n:translate="">
Action name
</tal:action>
</a>
UPDATE: Thanks to Joel David @jlnd for this update...
With this code (Clouseau installed):
<a href="" tal:attributes="href daction/url; title daction/description">
<img tal:condition="daction/icon|nothing" tal:attributes="src daction/icon; alt daction/title; title daction/title" />
<tal:action tal:condition="not:daction/icon" tal:content="daction/title" i18n:translate="">
Action name
</tal:action>
</a>



