A number of promotionalContent
items are associated with images that are site and/or locale-specific. These promotionalContent
items have two properties, image
and derivedImage
, that work together to derive an image URL that is appropriate for the current site context.
A promotionalContent
item’s image
property contains a URL that uses {site}
and {language}
variables. For example, the Get 2 Free Gifts with any Woman’s Jacket promotionalContent
item’s image
property has the following value:
/crsdocroot/content/images/hero_promo_{site}_{language}_women.png
This URL provides the foundation for deriving a site and locale-specific URL for the image. A JSP reference to a promotionalContent
item’s derivedImage
property calls the atg.projects.store.dp.StoreContextDerivation
class and passes it the value of the item’s image
property. The StoreContextDerivation
class derives the URL by replacing the {site}
and {language}
variables in the image
property value with the current site’s site ID and language. For example, the image
property value above could result in a derived URL that is similar to the following:
/crsdocroot/content/images/hero_promo_storeSiteUS_en_women.png
This URL renders the promotional image that is displayed for the Women’s category on the Category Page
when the current site is CRS Store US and the current language is English.
![This illustration is described in the preceding text.](media/image125.png)
If you look in the storedocroot.war/content/images/atghome
, /atgstore
, /c2call
and /email
directories, you will see a number of images that are managed using this variable replacement mechanism.