Carousel to show top destination | Community
Skip to main content
Level 2
April 28, 2022
Solved

Carousel to show top destination

  • April 28, 2022
  • 3 replies
  • 1192 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Himanshu_Jain

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.

3 replies

Ravi_Pampana
Community Advisor
Community Advisor
April 28, 2022

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

VeenaVikraman
Community Advisor
Community Advisor
April 29, 2022

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

Jangra98Author
Level 2
April 30, 2022

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

Himanshu_Jain
Community Advisor
Himanshu_JainCommunity AdvisorAccepted solution
Community Advisor
April 29, 2022

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