Managing Portlets

To assign the different types of portlet into your site, use the “Manage portlets” item on the Toolbar.

There are three locations where portlets can be put: to the left, to the right, and in the footer.

Note

The “left”, “right” and “footer” locations come from the classical website design. It is entirely possible, using Diazo theming, to move these portlet locations from one place to another. In fact, many so-called responsive designs, that automatically scale for mobile devices, will not display these as ‘left’ and ‘right’.

There is still a relevance to these different locations, even on mobile devices: as a rule of thumb, the ‘left’ portlets will be displayed before the main content, and the ‘right’ portlets afterwards, with the ‘footer’ portlets last.

*** Settings ***

Resource  plone/app/robotframework/server.robot
Resource  plone/app/robotframework/keywords.robot
Resource  Selenium2Screenshots/keywords.robot

Library  OperatingSystem

Suite Setup  Run keywords  Suite Setup  Test Setup
Suite Teardown  Run keywords  Test teardown  Suite Teardown

*** Variables ***

${FIXTURE}  plone.app.robotframework.PLONE_ROBOT_TESTING
@{DIMENSIONS}  1024  768
@{APPLY_PROFILES}  plone.app.contenttypes:plone-content


*** Keywords ***

Suite Setup
    Run keyword if  not sys.argv[0].startswith('bin/robot')
    ...             Setup Plone site  ${FIXTURE}
    Run keyword if  sys.argv[0].startswith('bin/robot')
    ...             Open test browser
    Run keyword and ignore error  Set window size  @{DIMENSIONS}

Test Setup
    Import library  Remote  ${PLONE_URL}/RobotRemote

    Run keyword if  sys.argv[0].startswith('bin/robot')
    ...             Remote ZODB SetUp  ${FIXTURE}

    ${language} =  Get environment variable  LANGUAGE  'en'
    Set default language  ${language}

    Enable autologin as  Manager
    ${user_id} =  Translate  user_id
    ...  default=jane-doe
    ${user_fullname} =  Translate  user_fullname
    ...  default=Jane Doe
    Create user  ${user_id}  Member  fullname=${user_fullname}
    Set autologin username  ${user_id}

Test Teardown
    Run keyword if  sys.argv[0].startswith('bin/robot')
    ...             Remote ZODB TearDown  ${FIXTURE}

Suite Teardown
    Run keyword if  not sys.argv[0].startswith('bin/robot')
    ...             Teardown Plone Site
    Run keyword if  sys.argv[0].startswith('bin/robot')
    ...             Close all browsers
Where to find the Portlet menu on the Toolbar

From here, you choose which region you want to work on. In the example below, we are working on the “footer portlets”

Note

The footer portlet region is new for Plone 5. If you have worked on previous versions of Plone: this is where you now can find (and edit) the colophon and other items.

List of footer portlets

The various options for “blocking” are explained in the Portlet hierarchy section.

Adding a Portlet

Adding a Portlet is as simple as selecting the Add Portlet drop down box and clicking on the type of Portlet you would like to add. We will cover the different options available in the next section.

Editing an Existing Portlet

To edit the properties of an existing Portlet, simply click on the name of the Portlet. If we wanted to edit the properties of the Navigation Portlet, we would Click on Navigation. Each type of Portlet will have different configuration options available to it.

Rearranging Portlets

To rearrange your Portlets, simply click the up or down arrow. This will affect the order your Portlets are displayed on the page.

Removing Portlets

To remove a Portlet, click the “X” associated with its name.

Hiding Portlets

You can show/hide portlets using the associated show/hide link.

Adding multiple portlets

With Portlets, you can add more than one of the same type on a page. There is no limit (except common sense) to how many times you can use an individual Portlet or a limit to how many total Portlets can be on a Page.