The page developer is responsible for inserting the targeter servlet bean that implements the slot into a site page. This example uses the TargetingFirst bean; any targeting bean will work.

In short, the investor home page pulls from the QFOfferSlot the first item that complies with the slot’s properties. That item displays as an image URL and links to offer.jsp.

To view how a slot is rendered in the investor home page:

<dsp:droplet name="/atg/targeting/TargetingFirst">
    <dsp:param bean="/atg/registry/Slots/QFOfferSlot" name="targeter"/>
    <dsp:param name="howMany" value="1"/>
    <dsp:param name="fireContentEvent" value="false"/>
    <dsp:param name="fireContentTypeEvent" value="false"/>
    <dsp:oparam name="output">
          <dsp:a href="offer.jsp">
          <dsp:param name="ElementId" param="element.repositoryId"/>
          <img border="0" src="<dsp:valueof param="element.imageURL"/>"></dsp:a>
    </dsp:oparam>
  </dsp:droplet>

The tags are described below:

<dsp:droplet name="/atg/targeting/TargetingFirst">

Invokes the TargetingFirst servlet bean. For more information on TargetingFirst, see the TargetingFirst section in ATG Page Developer's Guide.

<dsp:param bean="/atg/registry/Slots/QFOfferSlot" name="targeter"/>

Instructs the servlet bean to execute the QFOfferSlot rules against the items in the repository.

<dsp:param name="howMany" value="1"/>

In conjunction with the servlet bean (TargetingFirst) determines the number of items that the site displays in the slot and the order in which they should display.

<dsp:oparam name="output">…</dsp:oparm>

Renders the located offer items as output available for display.

<dsp:a href="offer.jsp">
<dsp:param name="ElementId" param="element.repositoryId"/>
<dsp:valueof param="element.imageURL"/>"></dsp:a>

Displays the image identified in the offer’s imageURL property as a link to offer.jsp. Sets the ElementId to the offer’s ID and passes it to offer.jsp. When the image is clicked, offer.jsp uses the ElementID to display the text stored in the offer’s relativePath property.