5 Replies Latest reply: Dec 5, 2012 9:19 AM by Gopinath Ramasamy RSS

    Using slots to render an image


      I have created a slot and associated it with a scenario. The slot points to a media external item.
      When I am trying to use the TargetingForEach droplet in page, it is not displaying anything. Debug states that items fetched is -1.
      Can anyone please guide me.
      Slot component properties file:
      # /atg/registry/Slots/HomePageImageSlot
      #Tue Dec 04 17:29:46 GMT+05:30 2012

      I have given the base image folder path as "/". I am not sure of the value to give here. Will be useful if someone lets me know.
      Also, I have created GridImage media external whose path and url points to "/images/grid.gif". This image is present in "home/doc/images". I suppose here the url will refer from the docroot.

      Scenario : Visits any page > Add item to slot name HomePageImageSlot named GridImage.

      This the droplet I am using in jsp:
      <dsp:droplet name="/atg/targeting/TargetingForEach">
      <dsp:param bean="/atg/registry/Slots/HomePageImageSlot" name="targeter"/>
      <dsp:oparam name="output">
      <dsp:getvalueof var="a7" param="element.URL" vartype="java.lang.String">
      <dsp:a href="${a7}">
      <dsp:valueof param="element.displayName"/>
      <dsp:getvalueof id="img14" param="element.image" idtype="java.lang.String">
      <dsp:img src="${img14}"/>

      Can someone guide me how to render this image.
      Thanks in advance.