[
https://issues.apache.org/jira/browse/SLING-5750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15621382#comment-15621382
]
Vineet Kumar commented on SLING-5750:
-------------------------------------
IMHO, if we just decorate the content resource path with a different resource
type, which I know works, would require another component to be created for
this other resource type. So for example if resource type of the content node
was "/apps/components/componeneta" which is changed by resource decorator to
"/apps/tenanta/componeneta", a component is to be defined for
"/apps/tenanta/componeneta" else it will not work.
If we can truly separate views/scripts from component definition, it will open
for a great opportunity where-in component/framework should be able to define
its own search order on multiple folders. The moment, we bind search paths for
both components and scripts at system level, this will not scale easily for
complex multi brands/tenants scenarios.
Have we thought about like this before and if yes, could you please point me to
that? I would also like to contribute towards this.
> Dynamically load different component renditions
> -----------------------------------------------
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
> Issue Type: Improvement
> Components: Commons
> Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
> property: sling:scriptFolder -> /apps/tenanta
> /tenantb/
> property: sling:scriptFolder -> /apps/tenantb
> Suggestion: If we would implement a dynamic search path the implementation
> can choose itself where to point to when we are in a multi-tenant environment.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)