Expand my Community achievements bar.

SOLVED

Carousel to show top destination

Avatar

Level 3

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
Community Advisor

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.

Himanshu Jain

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

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

Avatar

Level 3

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
Community Advisor

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.

Himanshu Jain