Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Converting cq:include to Sightly

Avatar

Level 7

Hi all,

I have a jsp page including a component as:

<cq:include path="ctaList" resourceType="mysite/components/ctaList" />

 

I converted it into this:

<sly data-sly-resource="${'ctaList' @ resourceType='mysite/components/htl/ctaList'}"/>

 

I can see the sling:resourceType of "mysite/components/ctaList" under /crx/de when using the jsp code. But I don't see the sling:resourceType anymore when using the Sightly code. How can I achieve the equivalent result as the jsp code in Sightly?

 

Thanks a lot!

 

-kt

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@kevingtan Sightly code looks fine to me & we do it in similar way and we see sling:resourceType populated in the node. How does the component work without resourceType set when you configure the component? Could you please put the screen shot from the crxde?

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@kevingtan Sightly code looks fine to me & we do it in similar way and we see sling:resourceType populated in the node. How does the component work without resourceType set when you configure the component? Could you please put the screen shot from the crxde?

Avatar

Level 7

It seems I made a mistake. Haven't input any content in the component yet and it wasn't saved on the jcr. Sorry for the confusion.