Saturday 22 September 2012

Re-ordering of portal pages in WebSphere Portal Server

WebSphere Portal Server maintains the portal pages in a hierarchy. They are arranged as a tree hierarchy with Content Root as the top. Each node, called content node, in the tree can be a page, a label, or a URL (internal or external). Pages and labels can be created by using out of the box portlet : Manage Pages portlet. 

By default after login, portal server picks the first child in the hierarchy, and if that child is a label (say A) then it fetches the fist child of A. The pages or labels can be reordered either using Manage Pages portlet or XMLAccess scripting interface provided by portal server.

  Re-Ordering using Manage Pages portlet.

 To reorder open the Portal Administration console and click on Manage pages link on left navigation. In manage pages portlet navigate to the page/label to be reordered. Then click on up or down arrow to move the page up or down in hierarchy.

 Re-Ordering pages using XMLAccess.

To use this method the creation of pages needs to be done using XMLAccess tool provided by portal server. Sample XMLs can be located on portal installation directory at following path:
\/docs/xml-samples/

 The position of a content node under a parent node in the hierarchy can be ranked by its ordinal, an integer. The smaller the ordinal, the higher the rank. The display and rendering of the content tree in Portal is according to the page ordinals.

When you add a node, you can specify its ordinal which can take the following values
first: this puts the content-node at the top of the hierarchy;
last: this puts the content-node at the bottom of the hierarchy;
• an integer: this puts the content-node by comparing the ordinals of those currently in the system and inserting it in the proper position;
• an hash mark "#" followed by an integer: this puts the page to the absolute location by counting the top one as 0, the second 1, and so on. Thus, "#12" will put the new content node to the 13th position in the current hierarchy.

No comments:

Post a Comment