Ohhh now I see what you are saying. Makes sense for simple use cases but here 
your breadcrumb is taking the responsibility of figuring out what script to 
load. Consider for use cases where in you have to identify script based on 
selector, extn etc, you will end up replicating what sling does very well. I 
would like to leverage same capability here so if I could tell sling to use 
scripts from different set of folders, nothing better than that.

On Jul 13, 2016 9:23 PM, "Jason Bailey [via Apache Sling]" 
<ml-node+s73963n4062524...@n3.nabble.com> wrote:
>
> I've never needed to have the resource resolver select a different script. 
>
> Referencing your example of breadcrumb.  I've had the main breadcrumb script 
> import the specific implementation based on a configuration. 
>
> /apps/www/components/breadcrumb/breadcrumb.jsp 
> /apps/www/components/breadcrumb/breadcrumb-site1.jsp 
> /apps/www/components/breadcrumb/breadcrumb-site2.jsp 
>
> The main breadcrumb.jsp is always executed and within that script is the 
> logic that determines which version of the breadcrumb we want to provide. At 
> that point we pull in the relevant jsp to render the site specific markup. 
>
> This keeps all your breadcrumb logic within a single structure. It also adds 
> value in the form of being able to offer sites options on how they would like 
> their breadcrumbs to look that could be controlled by configuration. 
>
>
>
> -----Original Message----- 
> From: vkum14 [mailto:[hidden email]] 
> Sent: Wednesday, July 13, 2016 10:27 AM 
> To: [hidden email] 
> Subject: Re: One Resource to multiple views in different locations 
>
> Hi Jason, 
>
> I believe you are talking about css/js here while my use case is to have even 
> different markups for the same component based on the site, it is being 
> rendered. IMO, this is a typical use case of telling servletresourceresolver 
> to pick different scripts based on the site input. Have you done some sorts 
> of that? 
>
>
>
> -- 
> View this message in context: 
> http://apache-sling.73963.n3.nabble.com/One-Resource-to-multiple-views-in-different-locations-tp4061093p4062511.html
> Sent from the Sling - Users mailing list archive at Nabble.com. 
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion 
> below:
> http://apache-sling.73963.n3.nabble.com/One-Resource-to-multiple-views-in-different-locations-tp4061093p4062524.html
> To unsubscribe from One Resource to multiple views in different locations, 
> click here.
> NAML



--
View this message in context: 
http://apache-sling.73963.n3.nabble.com/One-Resource-to-multiple-views-in-different-locations-tp4061093p4062529.html
Sent from the Sling - Users mailing list archive at Nabble.com.

Reply via email to