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

Plone Action Icons at the Bottom

by Harald Hoyer last modified Oct 23, 2007 10:53 AM
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

Filed under: , ,

thank you

Avatar Posted by mgr at Oct 09, 2007 08:36 AM
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

Avatar Posted by Silvio Tomatis at Nov 07, 2007 10:51 AM
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

Avatar Posted by Nuno Cruz at Aug 05, 2008 07:07 PM
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

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

Thank you for the code snippets!

Avatar Posted by Paul at Jun 17, 2011 04:37 PM
Thank you for the code snippets and explanation. Extremely helpful! :-)

documentation update

Avatar Posted by les at Feb 11, 2008 11:43 AM

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?

Avatar Posted by Edgar Smolow at May 13, 2008 11:07 AM
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

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

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


Thanks.

I hope it helps

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

tal:content="daction/title">

from "a" tag

great !

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

re: both

Avatar Posted by Sam Kranz at Feb 18, 2011 10:58 AM
How can I get both siteaction title and icon in the plone.site_actions

thanks

Add comment

You can add a comment by filling out the form below. Plain text formatting.

(Required)
Please enter your name.
(Required)
(Required)
(Required)
Enter the word