I have a page component (/libs/wcm/foundation/components/page) with other included components like:
<sly data-sly-resource="${'search' @ resourceType='/apps/project/components/search'}" sly/>
How can I get a list of these components in a Sling Filter? I tried to use scope SlingFilterScope.COMPONENT, but all components included with data-sly-resource are ignored and I get only components added to parsys.
My "doFilter" method:
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
Object resource = request.getAttribute("org.apache.sling.api.include.resource");
if (resource instanceof Resource) {
String resourceType = resource.getResourceType();
}
chain.doFilter(request, response);
}
Thanks for any help.
Views
Replies
Total Likes
do you see the component node(search component) created under page node (/content/project_name/en/...)? one way you can do is get the page resource and iterate all the component nodes. Can you share the AEM version? Let me try
Views
Replies
Total Likes