<portal-theme-ext/> tags

 

+

Search Tips   |   Advanced Search

 

The <portal-theme-ext/> tags provide extended functionality to enhance portal themes.

The following table provides a brief description of each tag.

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 that are defined by the plugin.xml.
<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.
<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.

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

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" 
       portletWindowState="Solo" 
       pacCheck="NoCheck" />

</extension>

When you want to use the extension that has been defined inside the plugin.xml in the JSP, we 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.

 

Related information