Package com.day.cq.personalization
Class TeaserUtils
- java.lang.Object
-
- com.day.cq.personalization.TeaserUtils
-
public class TeaserUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TeaserUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getImage(Page teaser)
Returns a image for the teaser, based on the following logic: check for page image check for first par image component check for first par textimage component fallback, return page template thumbnailstatic java.lang.String
getImage(SlingHttpServletRequest request, Page teaser)
Returns a image for the teaser, based on the following logic: check for page image check for first par image component check for first par textimage component fallback, return page template thumbnail
-
-
-
Method Detail
-
getImage
public static java.lang.String getImage(Page teaser)
Returns a image for the teaser, based on the following logic:- check for page image
- check for first par image component
- check for first par textimage component
- fallback, return page template thumbnail
- Parameters:
teaser
- Teaser page- Returns:
- A URL to the image.
-
getImage
public static java.lang.String getImage(SlingHttpServletRequest request, Page teaser)
Returns a image for the teaser, based on the following logic:- check for page image
- check for first par image component
- check for first par textimage component
- fallback, return page template thumbnail
- Parameters:
request
- SlingHttpServletRequest used for resource mappingteaser
- Teaser page- Returns:
- A URL to the image.
-
-