Read page design(policy) of editable template in a component




I have added a new design property of a template i.e. added a new property in the cq:designDialog of the template base component.

I am trying to retrieve value of this page design property in a specific component using currentStyle but it is returning blank.

I can see the property saved under the policy node. E.g path:


How can I retrieve this. I tried this code as well but it doesn't work. "contentPolicy " is returned null. I guess it works for component design policy only.

ResourceResolver resourceResolver = getRequest().getResourceResolver();

        ContentPolicyManager policyManager = (ContentPolicyManager)resourceResolver.adaptTo(ContentPolicyManager.class);

        if (policyManager != null)


        ContentPolicy contentPolicy = policyManager.getPolicy(this.getResource());

          if (contentPolicy != null) {

            this.faviconPath = contentPolicy.getProperties().get("faviconpath", "test").toString();

            LOGGER.info("faviconPath: " + faviconPath);



Any help would be appreciated.


Shallu Rohilla