You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Alexander Klimetschek <ak...@adobe.com> on 2013/11/01 00:17:21 UTC
Re: Script resolution newbie question
Hi Alessandro!
On 31.10.2013, at 07:28, Alessandro Bologna <al...@gmail.com> wrote:
> For requests that have a specific header, say "Host:otherapp", I want
> instead to use scripts located at /apps/myotherapp/page.
>
> Short of duplicating the resource, what's the best practice to implement this?
I would say the best practice actually IS to have a separate resource tree for another host/tenant. As soon as ACLs or other little differences between hosts come into play, this is the best approach. Otherwise you'll start reimplementing a lot of what the repository and sling gives you already.
Cheers,
Alex
Re: Script resolution newbie question
Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,
On Fri, Nov 1, 2013 at 12:28 AM, Alessandro
<al...@gmail.com> wrote:
> ...a way to dispatch a different set of rendering templates based on the host/path and keep the
> rendering code/deployment separate would be useful...
We keep hearing similar requirements from time to time, and I have
this vague feeling that reasonably small changes to Sling might enable
that. But to be more concrete we need actual use cases.
If you're willing to come up with a small set of more precise use
cases that describe what you want to do, that might help figure out
what's exactly missing to make this possible out of the box.
-Bertrand
Re: Script resolution newbie question
Posted by Alessandro <al...@gmail.com>.
Hi Alex!
But what if I have a few millions or so of those tiny little resources and no differences at all in acls (anonymous can read, authenticated users can write) or even their categorization (an article is an article is an article)...
Then a way to dispatch a different set of rendering templates based on the host/path and keep the rendering code/deployment separate would be useful...
Cheers!
Alessandro
> On Oct 31, 2013, at 7:17 PM, Alexander Klimetschek <ak...@adobe.com> wrote:
>
> Hi Alessandro!
>
>> On 31.10.2013, at 07:28, Alessandro Bologna <al...@gmail.com> wrote:
>>
>> For requests that have a specific header, say "Host:otherapp", I want
>> instead to use scripts located at /apps/myotherapp/page.
>>
>> Short of duplicating the resource, what's the best practice to implement this?
>
> I would say the best practice actually IS to have a separate resource tree for another host/tenant. As soon as ACLs or other little differences between hosts come into play, this is the best approach. Otherwise you'll start reimplementing a lot of what the repository and sling gives you already.
>
> Cheers,
> Alex
>