Listing 1 - Code Listing for portal_slot
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
i18n:domain="plone">
<body>
<!-- The Personal Tabs box -->
<div metal:define-macro="personal_slot"
tal:define="portal_url here/portal_url;
user_actions actions/user;
global_actions actions/global;
display_actions python:user_actions[: 1]+global_actions+user_actions[-1:];"
tal:condition="not: here/portal_membership/isAnonymousUser">
<div class="box">
<h5 i18n:translate="box_related">Personal</h5>
<div class="body">
<div class="content odd">
<a href=""
tal:omit-tag="not: here/portal_membership/getHomeFolder"
tal:condition="not:here/portal_membership/isAnonymousUser"
tal:attributes="href string:${here/portal_membership/getHomeUrl}">
<img tal:replace="structure here/user.gif" />
<span tal:replace="user/getUserName">john</span>
</a>
<br />
<div tal:repeat="action python:display_actions">
<a href=""
tal:attributes="href action/url">
<span tal:replace="action/name">dummy</span>
</a>
</div>
<div tal:define="portal_url here/portal_url" tal:condition="python:test(hasattr(here,'portal_registration') and here.portal_membership.checkPermission('Add portal member', here), 1, 0)">
<a href=""
tal:attributes="href string:$portal_url/portal_form/join_form"
tal:content="string:Add User">
</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
|