Skip to main content
Apr 25, 2016 6:51 AM UTC
Solved

One Resource to multiple view mapping

Hey All,

Is it possible for Sling to map one resource to multiple views. Say I have a component @ /apps/<site>/components/breadcrumb and this has multiple views under /etc/1/components/breadcrumb/view.jsp and  /etc/2/components/breadcrumb/view.jsp, I want Sling to check if view is present in /etc/2 hierarchy then pick that one else pick the one in etc/1 hierarchy . Is it possible to implement this with current Sling Resource Resolver ?

Regards

Shivika

shivisaggi@gmail.com

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Tuhin_Ghosh
Tuhin_GhoshAccepted solution
Level 8
Apr 28, 2016 2:20 AM UTC

2 replies

mkumar
Level 3
Apr 25, 2016 9:20 AM UTC

Similar functionality can be achieved through using the selectors in the request url. You can have multiple views/jsp according to your design and need in your component level.

Refer the below url for more information on selectors.

https://docs.adobe.com/docs/en/aem/6-1/develop/the-basics.html#Locating the script

Translate
Tuhin_Ghosh
Tuhin_GhoshAccepted solution
Level 8
Apr 28, 2016 2:20 AM UTC