<portal-theme-ext/> tags
The <portal-theme-ext/> tags are used to provide extended functionality to enhance portal themes.
The following table provides a brief description of each tag.
Note: Do not use portal tags in portlet JSPs.. The tags mentioned below are only for use in theme and skin JSPS.
Tag Description <portal-theme-ext:initthemepolicy/> Used to get the theme policy for the current page. <portal-theme-ext:themeExtension/> Used to locate the theme extensions defined by the plugin.xml. <portal-theme-ext:themeExtensionLoop/> Used for iterating through all of the extensions defined in the plugin.xml. <portal-theme-ext:themeExtensionItemTooltip/> Prints the tool tip for the extension if available. <portal-theme-ext:themeExtensionItemText/> Prints the text associated with the extension. <portal-theme-ext:themeExtensionItemUrl/> Streams the URL associated with the current ThemeLinkItem to the output stream. <portal-theme-ext:themeExtensionItemIconUrl/> Creates a URL for the extension icon. <portal-theme-ext:themeExtensionRenderInclude/> Renders extensions which use the com.ibm.portal.theme.plugin.ThemeInclude interface.
Detailed descriptions of the <portal-theme/> tags
The following section provides detailed descriptions of the <portal-theme/> JSP tags:<portal-theme-ext:initthemepolicy/>
Used to get the theme policy for the current page. The tag makes two variables available in the JSP.
<portal-theme-ext:themeExtension id=" id_name"/>Variables
portalThemePolicyMapHolds all of the theme policy values as a map.
portalThemePolicyPathHolds the path of the theme policy.
Used to locate the theme extensions defined by the plugin.xml. The tag has one attribute.
Attributes
idSpecifies the id of the extension you will be using that is defined in the plugin.xml. The following example is where com.ibm.portal.theme.plugin.MenuItem is defined inside the plugin.xml and is used for the id attribute:
<extension point="com.ibm.portal.theme.plugin.MenuItem" id="MenuItems" name="PageMenuItems"> <item id="PageMenuItemOne" class="com.ibm.wps.theme.plugin.impl.PageMenuItem" context="com.ibm.wps.theme.plugin.impl.PageContext" name="Item One" resourceBundle="nls.engine" title="link.itemone" portletWindowState="Solo" pacCheck="NoCheck" /> </extension>When you want to use the extension that has been defined inside the plugin.xml in JSP, you can then use the tag as follows:
<portal-theme-ext:themeExtension id="com.ibm.portal.theme.plugin.MenuItem" > <portal-theme-ext:themeExtensionLoop> . . [extensions rendered] . . </portal-theme:themeExtensionLoop> </portal-theme:themeExtension><portal-theme-ext:themeExtensionLoop/>Used for iterating through all of the extensions defined in the plugin.xml.
<portal-theme-ext:themeExtensionItemTooltip/>
Prints the tool tip for the extension if available.
<portal-theme-ext:themeExtensionItemText/>
Prints the text associated with the extension. The extension must implement the com.ibm.portal.theme.plugin.ThemeTextItem interface.
The following code example uses this tag to include text inside a table that is being created:
<table> <portal-theme-ext:themeExtension id="com.ibm.portal.theme.plugin.PageMenuItem" > <portal-theme-ext:themeExtensionLoop> <tr> <td> <portal-theme-ext:themeExtensionItemText/> </td> </tr> </portal-theme:themeExtensionLoop> </portal-theme:themeExtension> </table><portal-theme-ext:themeExtensionItemUrl"/>
Streams the URL associated with the current ThemeLinkItem to the output stream.
The following code example uses this tag to set the location of the anchor tag to the current ThemeLinkItem:
<portal-theme-ext:themeExtension id="com.ibm.portal.theme.plugin.PageMenuItem" > <portal-theme-ext:themeExtensionLoop> <c:set var="extensionTitle"><portal-fmt:title varname="<%=(com.ibm.portal.theme.plugin.ThemeItem) themeExtension%>" /></c:set> <a href="<portal-theme-ext:themeExtensionItemUrl />"><c-rt:out value="${extensionTitle}" escapeXml="true" /></a> </portal-theme:themeExtensionLoop> </portal-theme:themeExtension><portal-theme-ext:themeExtensionItemIconUrl state=" filename_state"/>
Creates a URL for the extension icon.
<portal-theme-ext:themeExtensionRenderInclude/>Attributes
stateRenders extensions which use the com.ibm.portal.theme.plugin.ThemeInclude interface. A ThemeInclude is a theme contribution responsible for its own rendering.
Parent
Tags used by the portal JSPs
portal-core tags
portal-dynamicui tags
portal-fmt tags
portal-logic tags
portal-navigation tags
portal-showtools tags
portal-skin tags