Tag libraries - Page Builder Theme : WP7


Tag libraries referred in the page builder theme are not directly accessible just like they do it in the earlier versions.  Instead by adding the empty decoratins.xml in WEB-INF directory of theme WAR file will solve that problem and it makes all the taglibs available to theme JSP’s.


Websphere portal resolves corresponding tlds using the xml’s like below that’s defined in plugin jars.

<!-- Theme tlds for v7 -->
<global-taglib>
<jar-name>wp.portal.theme.tlds.jar</jar-name>
<tld-path path="portal-v7-core.tld" uri="http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-core">
       <availability-condition>
              <type>WEBINF-FILE</type>
              <webinf-filename>/WEB-INF/decorations.xml</webinf-filename>
              </availability-condition>
       </tld-path>
</global-taglib>
……
……

You can find the wp.portal.theme.tlds.jar in wp.ext.jar in WAS plugin directory i.e under <PortalInstall>\AppServer\plugins\wp.ext.jar .


Another important thing is page builder uses WP bean lot in theme JSP’s e.g. like below

${wp.selectionModel.selectionPath[0]}
${wp.identification[node]}
${wp.navigationModel.children[node]}


But you don’t find any documentation about members of WP bean except by looking at the out of the box theme jsps to find some samples.

If you want to make use of this WP bean in your custom theme (i.e. in standard portal theme) you can initialize the WP as below in your theme JSP’s

<%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.1.0.3/portal-el" prefix="portal-el" %>

<portal-el:init/>


Note: “wp.jsp.el.jar” contains the  respective classes for the WP bean 

3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hallo.Ι tried to make a theme and changing the top navigator menu with the use of wp bean. I've manage to take the titles of some pages under one main Portal page and of its children but i cannot get the friendly url of each node. Is there any way to take friendly url of one node with wp bean? Is there any documentation or other helping documents for the use of wp bean?

    ReplyDelete
  3. wp bean details are not documented anywhere or open to public but you can extract "wp.jsp.el.jar" and get some more idea about that bean.

    ReplyDelete