The store.war/cartridges/MediaBanner/MediaBanner.jsp
page retrieves the imageURL
and link
properties from the response MediaBanner
content item and then renders the image. If the link
property has a value, the image is rendered as a link.
Because the link property can contain any one of three types of Action
objects, the MediaBanner.jsp
page invokes a helper component called /atg/endeca/store/droplet/ActionURLDroplet
, which is of class atg.projects.store.droplet.ActionURLDroplet
. This component takes the Action
object returned in the MediaBanner.link
property as an action
input parameter and returns an actionURL
string that represents the complete URL for the media banner image link. The form of the complete URL depends on the type of Action
object:
For a
NavigationAction
object, the complete URL is composed of the request’s context path followed by theNavigationAction
object’scontentPath
andnavigationState
properties.For a
RecordAction
object, the complete URL is composed of the request’s context path followed by theRecordAction
object’scontentPath
andrecordState
properties.For a
UrlAction
object, the form of the complete URL depends on whether or not a relative URL was defined for the link in Experience Manager. If a relative URL was defined, theActionURLDroplet
component returns a URL that is composed of the request’s context path followed by theUrlAction
object’surl
property. If a full URL was specified in Experience Manager, theActionURLDroplet
component returns theUrlAction
object’surl
property by itself.
The following code example shows the use of the ActionURLDroplet
in the renderer code:
<dsp:droplet name="ActionURLDroplet"> <dsp:param name="action" value="${contentItem.link}"/> <dsp:oparam name="output"> <dsp:getvalueof var="actionURL" param="actionURL"/> </dsp:oparam> </dsp:droplet>