Description
As a developer:
I want the carousel component to dynamically pull content from content fragments that are set in the components dialog properties o that the content can be updated in the fragments and automatically displayed in the carousel.
Acceptance Criteria:
The author sets the list of content fragments in the components dialog then the component fetches content from selected content fragments.
Content fragment details (e.g., title, description, images) are displayed correctly within each slide.
Changes in content fragments reflect in the carousel component without manual updates.
Can anyone provide any example or anything related to this will be really helpful and here what is the exact expections would help me.
Regards
Vinith M
Views
Replies
Total Likes
Hi @Vineeee
On simple straight forwars way yhat I see is this:
PS: Sorry for the typos. I responded from mobile, and it seams the responsive site does not have Edit option to my comment.
Views
Replies
Total Likes
@Tethich Thank you so much for explaining me in the simple terms
Views
Replies
Total Likes
Hi @Vineeee
Please find the below example you are looking for -
1. Provide a CF path in dialog as below
GitHub core component examples :
2. Read the CF path in sling model, retrieve the properties using Content Fragment API and implement getters and setters for title, description and images
Core component content fragment is implemented this way, you can check the implementation and override the component
Hope this helps !
Thanks
Prathyusha
Thank you @PRATHYUSHA_VP it did help me understand much more.
Thank you @arunpatidar I will try to do it.
Views
Replies
Total Likes
Hi @arunpatidar
Can u please explain with some more steps it would be really helpful.Add items as Content Fragments should it be done programatically from Sling Model? or any other way.
Views
Replies
Total Likes
Hi @arunpatidar,
Thank you for your suggestion! Could you please explain the steps in more detail? Specifically:
Views
Replies
Total Likes
Hi @Vinithm2
Step1 - Allow content fragment component in the allowed component list from Carousel component 's policy
Step2 - Identify content fragment Items to create card and write CSS , step mentioned by @PRATHYUSHA_VP
you don't need to override anything until you can manage styling of content fragment model using CSS.