Converting cq:include to Sightly | Community
Skip to main content
Level 5
April 19, 2023
Solved

Converting cq:include to Sightly

  • April 19, 2023
  • 1 reply
  • 914 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Saravanan_Dharmaraj

@kevin_gta 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?

1 reply

Saravanan_Dharmaraj
Community Advisor
Saravanan_DharmarajCommunity AdvisorAccepted solution
Community Advisor
April 20, 2023

@kevin_gta 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?

Kevin_GTaAuthor
Level 5
April 20, 2023

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.