Personal tools
You are here: Home Session 1 Controling Tabs
Document Actions

Controling Tabs

by ggavilan last modified 2006-10-03 14:08
Plone Layout



























How to change the tabs (Home, News, etc) at the top of your Plone portal.

In this section we explain how to:

  1. Not show the tabs put there by default in the out-of-the-box Plone
  2. Make a new tab
  3. Change tab order
  4. Make tabs only appear after login or for certain roles

1) Automatically generated tabs

As of Plone 2.1, the tabs on the top will automatically be generated based on the folders that exist in the root of your Plone site. You can rename, re-order and create new tabs by going to the root of your Plone site and clicking the contents tab.

If you want to turn this behaviour off, you can go to Site setup, Navigation settings, and untick the box Automatically generate tabs.

Since Plone 2.0, and still in Plone 2.1, you can also manage tabs manually using the portal_actions tool in the ZMI:

2) - Making tabs not appear

Say you want to get rid of the "Home" tab from the top of the portal.

Go to the Zope Management Interface (ZMI) in Plone Setup, and then to the portal_actions tool.

In this list, there are lots of different items, look for the things you want to not show (the tabs at the top have category portal_tabs). Untick the Visible checkbox on the items you do not want to appear in the portal.

3) - Making a new tab

First, create a folder in root of your Plone site from the Plone interface (not the ZMI). This is the new folder your new tab will link to. Make a note of the Short Name you give it, you will need this for the tab definition later.

Then, go to the ZMI and into the portal_actions tool (as in the first part of this how-to). Scroll down to the bottom of the page and you will see a form to add a new action.

Here you do the following:

  1. Enter the Short Name you made a note of earlier in the Id field. The reason these have to be the same is to get selection highlighting of the tab to work correctly.
  2. Type the name you wish to appear in the tab itself into the Name field.
  3. Type string:$portal_url/my-short-name into the URL (Expression) field. Replace my-short-name being the Short Name of the folder you created earlier and made a note of. Make sure there are no spaces in what you just typed.
  4. Leave the Condition field empty.
  5. Select View from the Permission field drop down menu. (Quick way to do this - since there are so many entries - is to select the pulldown, and press the V key on your keyboard.)
  6. Type "portal_tabs" into the Category field.
  7. Tick the Visible? box.
  8. Click add at the bottom of the form.

4) - Changing tab order

To change the order in which the tabs appear on the page, change their order in the ZMI by moving them above or below each other.

Go to the ZMI and then to the portal_actions tool, as explained earlier. Then select the box to the left of the item you want to move and then click on Move down or Move up buttons, next to the Save and Delete buttons near the bottom of the list of items.

  • To disable the tabs
  • Click on portal_actions
    • Located: at your site root
  • Uncheck Visible for all the Actions with the Category of portal_tabs
  • Click the Save button on the bottom of the form

« April 2024 »
Su Mo Tu We Th Fr Sa
123456
78910111213
14151617181920
21222324252627
282930
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: