How can i get images to automatically display in carousel component that are unique to the page/content beneath?

Avatar

Avatar
Validate 1
Level 1
kevinc55336069
Level 1

Like

1 like

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
kevinc55336069
Level 1

Like

1 like

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
kevinc55336069
Level 1

15-05-2019

I have created a custom carousel component that sits on the top of each page of my site (shared component) and allows the author to manually pick 5 images from DAM assets to be displayed in the carousel. I now want to have images displayed in the carousel that are unique to each individual page and it's content (lots of images on every page). I want these 5 pictures to be the 5 most recent article assets, as the content and pictures are updated every month. Could someone point me in the right direction on how to do this or provide any similar examples?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

15-05-2019

you need to get image dynamically(based on your business case) from DAM using Java logic in your components and do rest like carousel behaviour.

for example you can create DOM dynamically from the latest image from fetched from JAVA code and show/hide one by one using javascript.

Answers (1)

Answers (1)

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

15-05-2019

This would require custom JavaScript  logic. I am not aware of any AEM Examples of this.