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 Home Page Middle Banner promotionalContent item’s image property has the following value:

/crsdocroot/content/images/atgstore/homepage_promo_{site}_{language}_anonymous.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. StoreContextDerivation 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/atgstore/homepage_promo_storeSiteUS_en_anonymous.png

This URL renders the hero image on the ATG Store US home page when the site is being viewed in English by an anonymous customer.

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.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices