Personal tools
You are here: Home Support Plone Development FAQ HOWTO: Plone: How to turn off the log in link in the personal toolbar

HOWTO: Plone: How to turn off the log in link in the personal toolbar

Document Actions
Up to Plone Development FAQ

Here's how to remove the log in link.

  1. Navigate to portal_membership in the ZMI, select the Actions tab and untick the Visible? option for the Login action. Then click Save at the bottom of the page.

  2. After you've done this you can login using the default portlet or by navigating directly to the login page at /login_form.

  3. Because the tool bar is now empty for anonymous users, we have to adjust the template to stop the bar completely collapsing to invisibility. In the ZMI, navigate to portal_skins/plone_templates and select global_personalbar. Next click customize. Edit the template code (changes are shown in red).

 

<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="personal_bar"
      id="portal-personaltools-wrapper"
      tal:define="display_actions python:user_actions[:-1]+global_actions+user_actions[-1:];
                  getIconFor nocall:putils/getIconFor;">

<h5 class="hiddenStructure" i18n:translate="heading_personal_tools">Personal tools</h5>

<ul id="portal-personaltools">

<tal:block condition="isAnon">
  <li id="anonymousUser">&nbsp;</li> 
</tal:block>

<tal:block condition="not: isAnon">
       <li class="portalUser" 
           tal:define="author python:mtool.getMemberInfo(user.getId())"><a 
           id="user-name"
           tal:attributes="href string:${portal_url}/author/${user/getId}">
           <span class="visualCaseSensitive"
                 tal:content="python:author and author['fullname'] or user.getUserName()">
                John
           </span>
       </a></li>
   </tal:block>

    <tal:actions tal:repeat="action python:here.getOrderedUserActions(keyed_actions=keyed_actions)">
        <li tal:define="icon python:getIconFor(action['category'], action['id'], None);
                        class_name string:visualIcon actionicon-${action/category}-${action/id};
                        class_name python:test(icon, class_name, nothing);"
            tal:attributes="class class_name">
            <a href=""
               tal:attributes="href action/url;
                               class python:test(icon, 'visualIconPadding', nothing);">
               <tal:actionname i18n:translate="" tal:content="action/title">dummy</tal:actionname>
            </a>
        </li>
    </tal:actions>

</ul>
</div>

</body>
</html>
Added 2008-03-12 22:24