Friday, August 28, 2009

Removing Unwanted spaces between the portlets

Introduction
One common problem which the portal developer come accross is the spacing issue that is formed between the portlets. Even though we develop themes and skins properly, the space between the portlets will still be exisiting. And in most of the scenario we want that to be controlled.

Here are few steps that needs to be followed to avoid the spaces between the portlets.

Removing Unwanted Spaces between the Portlets
a) Changing the default Skin for the themes
The custom theme or the exisiting portal theme which is applied to the portal page will have the default skin. To remove the unwanted spaces which is occuring between the portlets, first the default skin needs to be changed to "IBM No Skin" which does not contain any drag and drop feature code.

b) Modifying the applied Skin
The Skin which is applied to the page has to be modified to remove the unwanted spaces. All the javascript code related to drag and drop should be removed from skin. If "IBM No Skin" is used for the portlet then this step is not needed, as it is by default will not contain any drag and drop related code.

The above changes will remove all the extra spaces between the portlets.

Drawbacks:
Even using the above changes we get rid of the extra spaces, we are also losing the drag and drop feature. The places where drag and drop needs to be implemented, the above approach can't be used. Till WPS6.1 i believe this is the only way where you can remove the spaces between the portlets.

Regards,
Elango

1 comment:

Carlos Andres said...

Hi there is another way to remove the spaces without disable dropanddrow in the theme, simple edit the UnlayeredContainer-H.jsp and UnlayeredContainer-V.jsp from the skin and remove the   character in the theme that is the one that put the space in the skin.