Hi Markus, On Thu, Aug 27, 2009 at 11:32 AM, Markus Pallo<pa...@dig.de> wrote: > ...its not a typical hosting environment, there is a company group (same big > company) which like to have for each individual company a custom layout. But > there will be several things shared. Also "website content", "apps", > "config" probably "users" ....
Ok, so you want the same content to be rendered differently depending on the hostname used to access the content. > ...2. one sling instance and templates resolved will include concrete > "domain_template" if neccesary. > so template in /apps/story/html.esp will probably include/load something > like > load("/apps/story/<%= request.getServerName()%>/html.esp");... This is what I was going to suggest. That forces you to define a hostname-specific script for every general script though, so you might need some glue code to find out if the specialized variant actually exists, and fall back to the general one if not. An ESP utiliity method might do, or a simple Java service helper. > ...3. modifications on resource resolver... Modifying the JcrResourceResolver2's getSearchPath() method to allow it to add components to the path based on the request comes to mind, but I'm not sure about the possible side effects. That might cause problem with the caching of scripts (just a wild guess). -Bertrand