cq:template does not work when using resourceSuperType | Adobe Higher Education
Skip to main content
Level 4
April 20, 2016

cq:template does not work when using resourceSuperType

  • April 20, 2016
  • 6 の返信
  • 4739 ビュー

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

このトピックへの返信は締め切られました。

6 の返信

mkumar
Level 3
April 20, 2016

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

Tuhin_Ghosh
Level 8
April 20, 2016

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

kautuk_sahni
Community Manager
Community Manager
April 22, 2016

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

Kautuk Sahni
edubey
Level 10
April 22, 2016

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

deana66659071作成者
Level 4
October 21, 2016

Has anyone been able to get this to work?

smacdonald2008
Level 10
October 21, 2016

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

deana66659071作成者
Level 4
October 21, 2016
Jitendra_S_Toma
Level 10
October 24, 2016

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

deana66659071作成者
Level 4
October 24, 2016

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

Jitendra_S_Toma
Level 10
October 25, 2016

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