Expand my Community achievements bar.

SOLVED

One Resource to multiple view mapping

Avatar

Level 1

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

1 Accepted Solution

Avatar

Correct answer by
Level 7
2 Replies

Avatar

Level 3

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

Avatar

Correct answer by
Level 7