Skip to content

nan

Sections
Personal tools
You are here: Home » How Tos » Portlet that displays Useractions   portlet4personalbar
Log in
No Software Patents!

Under the influence of the patent system and big industry lobbyists, the European Union is on the verge of making a huge mistake: to pass a law that would legalize software patents.

 

Portlet that displays Useractions

Document Actions
The useractions are displayed on top of your Plonesite. This Howto shows you how you put that into a portlet.
Create a pagetemplate named 'portlet_personalbar' in your cusom Folder:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
i18n:domain="plone">

<body>

<!-- THE PERSONAL BAR DEFINITION -->

<div metal:define-macro="portlet"
tal:define="display_actions python:user_actions[:-1]+global_actions+user_actions[-1:];"
tal:omit-tag="">
<div class="portlet" id="portlet-personaltab">

<h5 i18n:translate="heading_personal_tools">Personal tools</h5>
<div class="portletBody">
<ul>
<li class="portalUser"
tal:condition="not: isAnon"><a
id="user-name"
tal:omit-tag="not: mtool/getHomeFolder"
tal:attributes="href string:${mtool/getHomeUrl}"
accesskey="accesskeys-personalbar"
i18n:attributes="accesskey">
<tal:block replace="structure portal_object/user.gif"/>
<span class="visualCaseSensitive"
tal:replace="user/getUserName">
John
</span>
</a></li>

<li class="portalNotLoggedIn" tal:condition="isAnon"
i18n:translate="you_are_not_logged_in">
You are not logged in
</li>


<tal:actions tal:repeat="action python:here.getOrderedUserActions(keyed_actions=keyed_actions)">
<li>
<a href=""
tal:attributes="href action/url"
accesskey="accesskeys-personalbar"
i18n:attributes="accesskey">
<img alt="" src=""
tal:define="actionid action/id;
icon python:aitool.renderActionIcon('personalBar_actions', actionid, None);"
tal:condition="icon"
tal:replace="structure icon" />
<!--img tal:attributes="src string:${action/id}" /-->
<tal:actionname i18n:translate="" tal:content="action/name">dummy</tal:actionname>
</a>
</li>
</tal:actions>

</ul>
</div>
</div>
</div>

</body>
</html>
Created by nan
Last modified 2005-01-07 10:20 PM
« December 2008 »
Su Mo Tu We Th Fr Sa
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
 
 

Powered by Plone

This site conforms to the following standards: