Hi,
I am using aem 6.5 and this query is for editable templates.
Is there any way to get list of allowed components selected in template .
Like I have given input path as /conf/abc/setting/wcm/templates/pqr
And get response as list of components added to layout container via policy or directly added etc
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
You can use the Content policy manager API to access the policies and its properties.
Ex: getPolicy(Resource contentResource).getProperties()
Hope this helps.
Thanks,
Kiran Vedantam.
Hi Kiran,
What is the maven dependency required for this? And if I provide template path, will that be sufficient?
I tried same but com.day.cq.wcm.api.policies is becoming unsatisfied in bundles
This is the dependency
<!-- https://mvnrepository.com/artifact/com.day.cq.wcm/cq-wcm-api -->
<dependency>
<groupId>com.day.cq.wcm</groupId>
<artifactId>cq-wcm-api</artifactId>
<version>5.6.6</version>
<scope>provided</scope>
</dependency>
https://mvnrepository.com/artifact/com.day.cq.wcm/cq-wcm-api/5.6.6
Thanks,
Kiran Vedantam.
Hi Kiran,
5.12.26 is already installed and provided above as well but still it is not resolving.
What error are you getting? Check if the bundle exists in the system/console, if not try uploading it manually.
Also while building try this command "mvn clean install -PautoInstallPackage,adobe-public"
Thanks,
Kiran Vedantam.
Yes that's what bundle already exists with 5.12.26 version
I m trying to use in servlet to get components list from template.
Hi,
Please check https://aemlab.blogspot.com/2020/08/restrict-allowed-component-group-in.html for reference.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Like
Replies