Package com.adobe.acs.commons.util
Class TemplateUtil
java.lang.Object
com.adobe.acs.commons.util.TemplateUtil
Utility functions for working with CQ Templates.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanhasTemplate(@Nullable com.day.cq.wcm.api.Page page, @Nullable String templatePath) Determine if the page is of a particular template type.
-
Method Details
-
hasTemplate
public static boolean hasTemplate(@Nullable @Nullable com.day.cq.wcm.api.Page page, @Nullable @Nullable String templatePath) Determine if the page is of a particular template type. This method is null safe and works properly in the publish and author environments.- Parameters:
page- the page to checktemplatePath- the path of the template to check- Returns:
- true if the page is of the defined template
-