Benutzerspezifische Werkzeuge
Sie sind hier: Startseite Linux Plone Customizations Plone Action Icons at the Bottom

Plone Action Icons at the Bottom

— abgelegt unter: , ,
erstellt von Harald Hoyer zuletzt verändert: 23.10.2007 10: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

Artikelaktionen
  • Drucken
  • Hits: 004956

thank you

Posted by mgr at 09.10.2007 08: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 07.11.2007 11: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 05.08.2008 19: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 08.08.2008 16: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 11.02.2008 12: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 13.05.2008 11: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 18.06.2008 18: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 03.07.2008 10:15
Probably you have forgotten to remove

tal:content="daction/title">

from "a" tag

great !

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