Empty Skin

Similar to Empty Theme, i built this empty skin that does not generate any markup, only iterate through portal page and pass control to all the portlets on page and let them generate markup for the page.

You can download the sample code for the Empty skin from here. The Empty skin has following three JSP pages

  1. This is how the UnlayeredContainer-V.jsp looks like

    <%@ page session="false" buffer="none" %>
    <%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-skin"
    prefix="portal-skin" %>
    <portal-skin:layoutNodeLoop var="currentLayoutNode">
    <portal-skin:layoutNodeRender/>
    </portal-skin:layoutNodeLoop>

    In this jsp i am looping through all the portlets in the current vertical container using portal-skin:layoutNodeLoop and passing control to the child container for rendering by calling portal-skin:layoutNodeRender/

  2. This is how the UnalyeredContainer-H.jsp looks like

    <%@ page session="false" buffer="none" %>
    <%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-skin"
    prefix="portal-skin" %>
    <portal-skin:layoutNodeLoop var="currentLayoutNode">
    <portal-skin:layoutNodeRender/>
    </portal-skin:layoutNodeLoop>

    This JSP is same as that of the UnlayeredContainer-V.jsp it iterates through every container and forwards control to that container for generating markup. In the actual Skin implementation the way this pages work is they create a table and if its vertical(UnlayeredContainer-V.jsp) then add every child container in row but if its horizontal container(UnlayeredContainer-H.jsp) then displays every child container next to each other using td tag. In empty skin, all the content will be generated after each other

  3. This is how the Control.jsp page in Empty Skin looks like

    <%@ page session="false" buffer="none" %>
    <%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-skin"
    prefix="portal-skin" %>
    <portal-skin:portletRender>
    </portal-skin:portletRender>

    The Control.jsp is forwarding control to the portlet by calling portal-skin:portletRender tag and then taking the markup generated by portlet and displaying it at current location



Important Note In the real world example you should generate table structure inside your UnlayeredContainer-*.jsp and create either td or tr for every portlet, to display the portlets either next to each other or below each other

1 comment:

Terry Roberts said...

Hi, I am trying to setup a skin with no markup, I have done same as you, I added some markup and I can see the UnlayeredContainer-V.jsp working, but the Control.jsp never seems to be called. I think the another Control.jsp is being called and I am getting some unexpected markup. My control.jsp is a bit different I use
<%@ taglib uri="/WEB-INF/tld/portal.tld" prefix="wps" %>
. But even if I delete my Control.jsp it doesn't matter because it is not being called. WPS v7. any ideas ?