On a JSP page, you can use the /atg/commerce/endeca/cache/DimensionValueCacheDroplet
component (of class atg.commerce.endeca.cache.DimensionValueCacheDroplet
) to obtain the dimension value associated with a specific category. This servlet bean takes the following input parameters:
repositoryId
The repository ID of the category to retrieve the correspondingDimensionValueCacheObject
for.
ancestors
A list of the repository IDs of the category’s ancestor categories, delimited by colons. This value helps determine the correctDimensionValueCacheObject
to retrieve for a category that has more than one path in the catalog hierarchy.
DimensionValueCacheDroplet
returns the DimensionValueCacheObject
entry that matches these parameters. For example:
<dsp:droplet name="DimensionValueCacheDroplet"> <dsp:param name="repositoryId" value="${categoryId}"/> <dsp:param name="ancestors" value="${topLevelCategoryId}"/> <dsp:oparam name="output"> <dsp:getvalueof var="categoryCacheEntry" param="dimensionValueCacheEntry" /> </dsp:oparam> </dsp:droplet>
The url
property of the DimensionValueCacheObject
can be used to render a link to an Endeca-driven category page. For example:
<dsp:a page="${categoryCacheEntry.url}"> <dsp:valueof value="${categoryDisplayName}"> <fmt:message key="common.categoryNameDefault" /> </dsp:valueof> </dsp:a>