Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Carousel to show top destination

Avatar

Level 2

Hi everyone

 

So, there is one requirement in which we have to show the top N number of destinations in the carousel and whenever a new destination is added to the top category it should automatically come on that carousel. How can we achieve that?

1 Accepted Solution

Avatar

Correct answer by
Level 4

Add a custom property in dialog for example ranking and set the value as per your need.

And from that value you can decide which image need to be shown first in carousel.

View solution in original post

4 Replies

Avatar

Community Advisor

Hi,

 

In java (sling model) you can use Collections.reverse after adding the carousel item nodes to collection which will display the last node on top

Avatar

Community Advisor

@Buland How do you handle the top category ? What decides a destination is a top category ? Do you set any property ? 

Avatar

Level 2

by just simply adding a tag to it. the main problem I have is how to iterate image and link in the carousel. 

Avatar

Correct answer by
Level 4

Add a custom property in dialog for example ranking and set the value as per your need.

And from that value you can decide which image need to be shown first in carousel.