Class TemplateUtil

java.lang.Object
com.adobe.acs.commons.util.TemplateUtil

@ProviderType public final class TemplateUtil extends Object
Utility functions for working with CQ Templates.
  • 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 check
      templatePath - the path of the template to check
      Returns:
      true if the page is of the defined template