Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

cq:template does not work when using resourceSuperType

Avatar

Level 5

We have a global components package that stores all of our "BASE" components.

When I extend the component using resourceSuperType, set a new component group, it seems to ignore the cq:template associated with it.

Is there a way to resolve this issue?

Thanks,

-Dean

0 Replies

Avatar

Level 3

When extending a component resourceSuperType is enough. How you are refering to cq:template property associated with it. what are you trying to achieve

Avatar

Level 7

Hi Dean,

Could you please package your code and share it, so that we can test the same and get back to you with a solution.

Thanks

Tuhin

Avatar

Administrator

Hi 

Any updates? If your problem has been solved in some way, please provide it in the post for the benefit of the community. 

Else please elaborate your problem, so that we can reproduce it at our end and help you out soon.

Thanks and Regards

Kautuk Sahni

Avatar

Level 10

Make sure scripts (.jsp/.html) you have included in base are available in child page component

Avatar

Level 10

Do you have an example that you can place in a Dropbox that some community member can download and see. That would be helpful. 

Avatar

Level 9

Hi deana66659071 ,

AEM Sling resource Inheritance model does not support inheritance for cq:template node. In order to fulfill your requirement, you may need to solve it by yourself. 

Possible Solution

Write a custom request filter for the POST request which should be able to look up the parent if any property is being used in current resource. Post request filter is important because once a component with cq:template is dropped onto the page, cq:template properties become the part of the current node/resource.

So, post request should make sure that current resource has required properties and if cq:template is not found in a component but it is there in parent component, then pull properties from parent component.

I hope this make sense.

Regards,

Jitendra

Avatar

Level 5

Jitendra,

I'd like to try that solution but I'm not sure how to implement it.  Do you know where I could find an example of your solution?

Thanks,

-Dean

Avatar

Level 9

No. You can't find any example for this solution. because this is my perspective to solve this problem.

deana66659071 wrote...

Jitendra,

I'd like to try that solution but I'm not sure how to implement it.  Do you know where I could find an example of your solution?

Thanks,

-Dean