0

I'm currently working on a hippo component within (7.9) and I need the image link, alt, and title:

Component Method:

public HippoGalleryImageSetBean getImage() {
    return getLinkedBean(Constants.NS_FLD_IMAGE,
            HippoGalleryImageSetBean.class);
}

I would like to write my Component JSP like this below:

    <c:forEach var="item" items="${ document.links }"
               varStatus="loopStatus">
               <hst:link var="image"hippobean="${ item.image.original }" />

               <li><img
                    src="${ image }"
                    alt="${ image.alt }"
                    title="${ image.title} ">
                </li>
    </c:forEach>
halfer
  • 19,824
  • 17
  • 99
  • 186
Tyler Canton
  • 571
  • 6
  • 14

1 Answers1

1

The 'alt' and 'title' are defined on the imageset itself and not in the image variants. ${image} in your case is the link generated to an image and not the image object itself.

Try it with:

<c:forEach var="item" 
           items="${ document.links }"
           varStatus="loopStatus">
  <hst:link var="imagelink"hippobean="${ item.image.original }" />
  <li><img src="${ imagelink }"
           alt="${ item.image.alt }"
           title="${ item.image.title} ">
  </li>
</c:forEach>
Jeroen
  • 3,076
  • 1
  • 17
  • 16