Personal tools
You are here: Home Linux Plone Customizations Plone Action Icons at the Bottom

Plone Action Icons at the Bottom

— filed under: , ,
by Harald Hoyer last modified Oct 23, 2007 09:53

Howto show small icons for the document actions

/Plone/portal_view_customizations -> zope.interface.interface-plone.abovecontenttitle.documentactions [Customize]

<div class="visualClear"><!-- --></div>
<div i18n:domain="plone"
class="documentActions">
<tal:docactions tal:condition="view/actions">

<h5 class="hiddenStructure" i18n:translate="heading_document_actions">Document Actions</h5>

<ul tal:define="normalizeString nocall: context/@@plone/normalizeString">
<tal:actions repeat="daction view/actions">
<li tal:attributes="id python:'document-action-' + normalizeString(daction['id'])">

Here is the modified part:

            <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>

 

        </li>
</tal:actions>

</ul>
</tal:docactions>

<div tal:replace="structure provider:plone.documentactions" />

</div>

Now you can add Icons to <instance>/portal_actionicons

Document Actions
  • Print this
  • Hits: 003836

thank you

Posted by mgr at Oct 09, 2007 07:36
Works as a charm! Thank you.

To spare other people's troubles, please consider adding an explanation the last step ("...add icons to ...").

I was wondering if a similar technique can be used to place icons at the top, to restore Plone 2 default behavior.
Please advise.

Thanks a gain.

Error in event view

Posted by Silvio Tomatis at Nov 07, 2007 10:51
Thank you for this snippet.
I had a bit of trouble with an Event page where two document actions (icalendar and vcalendar) show up.
They don't seem to have an 'icon' attribute, and throw a TraversalError when accessed in tales daction/icon.
So I had to change the conditions above to:
tal:condition="python: daction.get('icon')"
and
tal:condition="python: not daction.get('icon')"

Plone Action Icons at the Bottom

Posted by Nuno Cruz at Aug 05, 2008 18:07
How to replace the calendar (ical and vcal) to icons in Plone 3.0.2. They just appear when the object is an event.

Plone Action Icons at the Bottom

Posted by VJ at Aug 08, 2008 15:55
I have the same problem.
How can I solve the problem of icons of the iCalendar and vCalendar?

documentation update

Posted by les at Feb 11, 2008 11:43

Thanks, this was very helpful. To use the icons already available in your Plone 3 site, instead of the ... add icons to ... section (we'll use the 'sendto' action in this example):

1. go to /portal_actions/document_actions/sendto
2. for the 'Icon (Expression)' field, enter 'string:$portal_url/mail_icon.gif'
3. save the changes

upon refreshing your page view you should now see the the mail icon instead of the 'Send this' text.

Something missing?

Posted by Edgar Smolow at May 13, 2008 10:07
I went to this page:
CMF Action at /portal_actions/document_actions/print
http://localhost:8080/[…]/manage_propertiesForm

and entered the following in the field labeled Icon (Expression):
string:$portal_url/print_icon.gif

But, the words "print this" are still shown instead of an icon. What's missing?

Thanks.


same

Posted by fred at Jun 18, 2008 17:14
I have the same problem.

Someone can help us to set actions icons visible in Plone 3 ???


Thanks.

I hope it helps

Posted by Pawel at Jul 03, 2008 09:15
Probably you have forgotten to remove

tal:content="daction/title">

from "a" tag

great !

Posted by marie olchanski at Aug 11, 2008 14:43
I wanted both text and icon! Just take off the 'not'
And I succed with your howto...
Thanks a lot!