On 29.May.2002 -- 04:25 PM, Christian Haul wrote: > > If one would extent the StringConstantModule to hold more than one > constant, or even look at the request object first whether the > parameter should be overridden, one could > > (in cocoon.xconf or wherever components can be declared) > > <input-modules logger="core.modules.input"> > <component-instance name="global-defaults" >class="org.apache.cocoon.components.modules.input.DefaultsModule"> > <skin>myskin</skin> > <base-url>http://localhost:8080</base-url> > <!-- more default values ad lib --> > </component-instance> > </input-modules> > > (in sitemap.xmap) > > <map:transform src="apply-skin.xsl"> > <map:parameter name="skin" value="{/module:global-defaults:skin}"/> > <map:parameter name="base" value="{/module:global-defaults:base-url}"/> > </map:transform> > > Plus, by chosing different names for multiple instances of such module > one could have different contexts. > > Would that make sense?
Since input modules are not yet supported for variable substitiotion, I have created a sample for this using an action. This particular action returns only an emtpy map but sets request attributes. I believe it sufficient to illustrate the concept / how the new input module works. Update your 2.1-dev from CVS, build and deploy, then get http://www.dvs1.informatik.tu-darmstadt.de/~haul/misc/c2/modules-test.jar unpack in $COCOON/mount, point your browser to http://localhost:8080/cocoon/mount/modules/test Add request parameter "skin" to URL (http://localhost:8080/cocoon/mount/modules/test?skin=test) Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]