+

Search Tips   |   Advanced Search

Implementing portlets for the site toolbar

The toolbar tabs of the Portal 8.5 site toolbar are represented as portal pages. The content of the toolbar tabs can be implemented using portlets.

Use the Java Portlet API to implement these portlets.


Access the main portal page running in the view area

To have the toolbar portlet access the main portal page currently displayed in the view area, use the following public render parameter. This parameter carries the serialized ObjectID of the main portal page, not the one of the toolbar content page. Use this ObjectID to locate the content page in the content model hierarchy of the portal using the public Model SPI or the Remote Model SPI to query page information using REST. We can display properties of the main page in the toolbar portlet or even modify page properties using the Controller SPIs.

    {http://www.ibm.com/xmlns/prod/websphere/portal/publicparams}selection


Work with page edit mode and page view mode

We can configure the toolbar portlet to differentiate between page edit mode and page view mode. In page edit mode, the content authors, page editors and administrators can modify the main portal page currently displayed in the main view area. In page view mode, we can provide read-only information about the main portal page. Use the following public render parameter to detect if page edit mode is active or inactive.

    {http://www.ibm.com/xmlns/prod/websphere/portal/publicparams}editMode


Work with page information mode

Use the following public render parameter if we want the toolbar portlet to display additional help information for the content authors, page editors and administrators. Or, use it if page information is active.

    {http://www.ibm.com/xmlns/prod/websphere/portal/publicparams}infoMode


Drag and Drop

If we want the toolbar tab to display a list of items that can be dragged to the portal page currently displayed in the main view area, we need to make these items draggable according to the Drag and Drop model of HTML 5. See Customize drag and drop.


Parent Prepare the site toolbar