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 following tags are
only for use in theme and skin JSPS.
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.
Variables
- portalThemePolicyMap
- Holds all of the theme policy values as a map.
- portalThemePolicyPath
- Holds the path of the theme policy.
- <portal-theme-ext:themeExtension
id="ID_name"/>
- Used to locate the theme extensions that are defined by the plugin.xml. The tag has one attribute.
Attributes
- id
- Specifies the ID of the extension you will be using that is defined
in the plugin.xml file. 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 file in your 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 that are 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.
Attributes
- state
- Specifies the state that is used to determine the file name of
the icon. Use the following values:
- STATE_ENABLED
- STATE_ENABLED_HOVER
- STATE_ACTIVE
- STATE_DISABLED
- <portal-theme-ext:themeExtensionRenderInclude/>
- Renders extensions which use the com.ibm.portal.theme.plugin.ThemeInclude interface. A ThemeInclude is a theme contribution responsible for
its own rendering.