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 ATG installation at the following location:
<ATG10dir>/WebUI/Preview/taglibs/webui-preview/lib
Copy the library to your site’s WAR file. For example, in Commerce Reference Store, the meta-inf/taglib.tld file can be found in <ATG10>/CommerceReferenceStore/Store/Storefront/j2ee-apps/Storefront/store.war/WEB-INF/lib/webui-preview-1_0.jar.
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 |
| Name of the repository that contains the asset |
| Asset type |
| Asset ID |
The following example is adapted from the Commerce Reference Store store.war/cartridges/HeaderBanner-ATGCategory\HeaderBanner-ATGCategory.jsp page, which displays the header banner defined for the currently selected category on category pages. In this 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>For a list of all Commerce Reference Store JSP pages that are tagged with <preview:repositoryItem>, see Tags for Visual Merchandising in the ATG Commerce Reference Store Overview.

