The Preview tag library contains a single tag, <preview:repositoryItem>
. The <preview:repositoryItem>
tag inserts item identifiers in JSP pages. The tag library source and definition files are included in your installation at the following location:
<ATG11dir>/WebUI/Preview/taglibs/webui-preview/lib
Copy the library to your site’s WAR file. In order to call the <preview:repositoryItem>
tag, the JSP must include this taglib directive:
<%@ taglib prefix="preview" uri="http://www.atg.com/taglibs/webui-preview_rt" %>
preview:repositoryItem
The <repositoryItem>
tag sets an explicit item identifier to be used in the body of a page. The identifier is calculated based on repository item data. The tag is defined as follows:
<preview:repositoryItem[
item
]
[
repositoryName
]
[
itemType]
[itemID]>
... </preview:repositoryItem>
Attribute | Description |
---|---|
| Page parameter. (See the |
| Name of the repository that contains the asset |
| Asset type |
| Asset ID |
In the following example, the <preview:repositoryItem>
tag calculates a class for the specified category repository item.
<dsp:getvalueof var="currentCategoryId" bean="/atg/endeca/assembler/cartridge/StoreCartridgeTools.currentCategoryId"/> <preview:repositoryItem itemId="${currentCategoryId}" itemType="category" repositoryName="ProductCatalog"> <h2 class="title"> <c:out value="${contentItem.headerTitle}" /> </h2> </preview:repositoryItem>