forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject Re: Multiple sites in one Cocoon instance (skins)
Date Wed, 14 May 2003 22:13:57 GMT
Andreas Hartmann wrote:
> Hi Forrest developers,
> I want to run multiple Forrest-based sites (with different
> skins) in one Cocoon instance. Is there any other way to
> define the skin than in cocoon.xconf?

The skin is located with {forrest:skin} inputmodule references in the 
sitemap. The 'forrest' inputmodule is defined in cocoon.xconf as:

       <component-instance logger="core.modules.input" name="forrest" 
         <input-module name="request-param"/>
         <input-module name="request-attr"/>
         <input-module name="session-attr"/>
         <input-module name="defaults"/>

And 'defaults' is where the actual skin value is usually obtained from:

     <component-instance name="defaults" 

ChainMetaModule queries each of its inputmodules in order, so if you can 
put a different 'skin' attribute in each site's session 
(session.setAttribute("skin", "...");), that will have the desired 
effect.  Probably the simplest way to do this is by writing a Cocoon Action.

Alternatively, you could just replace the single <skin> entry in the 
DefaultsMetaModule with <skin-site1> and <skin-site2>, but then the 
sitemaps would have to have {forrest:skin} changed to 
{forrest:skin-site1|2} too.


> Thanks in advance!
> Andreas

View raw message