Skip to main content
nibeditan172848
May 21, 2020 1:38 PM UTC
Solved

How to make carousel core component as AMP compatible?

If we make use of any ready mark up available for carousel component w.r.t amp, we are unable to fetch the teaser title,description and button link. We followed this link https://amp.dev/documentation/examples/multimedia-animations/image_galleries_with_amp-carousel/ for getting ready markup for AMP.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
EstebanBustamante
EstebanBustamanteAccepted solution
Adobe Champion and Community Advisor
Feb 14, 2025 9:41 PM UTC

Hi,

 

I'm not sure it makes sense to adapt the core component to leverage this "AMP" framework. You would need to update the markup and JS with the necessary AMP-specific markup, styles, and behavior. It might be easier to just create a new custom component and integrate AMP there. In any case, you can retrieve the component information via its Sling model. If you really want to use the core component, you can check its Sling model here:https://github.com/adobe/aem-core-wcm-components/blob/main/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/models/v1/CarouselImpl.java; otherwise, you'll need to write your own Sling model and use that one. Here is a good example: https://medium.com/@toimrank/aem-sling-models-ea0fb2606625

 


hope this helps

Esteban Bustamante

2 replies

EstebanBustamante
Adobe Champion and Community Advisor
EstebanBustamanteAdobe Champion and Community AdvisorAccepted solution
Adobe Champion and Community Advisor
Feb 14, 2025 9:41 PM UTC

Hi,

 

I'm not sure it makes sense to adapt the core component to leverage this "AMP" framework. You would need to update the markup and JS with the necessary AMP-specific markup, styles, and behavior. It might be easier to just create a new custom component and integrate AMP there. In any case, you can retrieve the component information via its Sling model. If you really want to use the core component, you can check its Sling model here:https://github.com/adobe/aem-core-wcm-components/blob/main/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/models/v1/CarouselImpl.java; otherwise, you'll need to write your own Sling model and use that one. Here is a good example: https://medium.com/@toimrank/aem-sling-models-ea0fb2606625

 


hope this helps

Translate
Esteban Bustamante
kautuk_sahni
Level 9
Mar 4, 2025 1:00 PM UTC

@nibeditan172848 Did you find the suggestion helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!

Translate
Kautuk Sahni