cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From david.grea...@idl-bt.com
Subject RE: Help: VelocityAggregator + Component approach to pages
Date Fri, 14 Dec 2001 18:03:06 GMT
Vadim wrote:
> > What I'd like to do instead is take the XHTML output of a 
> pipeline and
> > essentially #include it into an XHTML template.
> > That means that the template provides an 'Interface' for
> sub-components (a
> > <td> cell :) and expects the component to return well formed XHTML
> suitable
> > for inclusion in a <td>. The component then performs whatever data
> gathering
> > is required and renders it to XHTML etc...
> > I can now get multiple components written, tested and debugged in
> isolation
> > (as pipelines) before simply binding them into a template (well,
> that's the
> > theory!)
> > The existing aggregate is too simplistic for that.
> 
> Take a look at cinclude/xinclude transformers. They do 
> exactly this (and
> may be more). Consult
> http://xml.apache.org/cocoon/userdocs/transformers/transformer
s.html for
the usage info.

OK, looks good...

I'm using a sitemap that invokes a Velocity generator that puts <cinclude>
tags into the XHTML then transforming via cinlude and it works quite well.

But (there's always one! :)

I want to pass parameters to the pipelines I'm cincluding.
If i <cinclude:include src="cocoon:/vm/menu.vm?area=/about"> I'd like to get
the menu for the /about area (the bean in the velocity pipeline page knows
what I mean)
However the cocoon:/vm/menu.vm doesn't seem to be able to access the
"area=/about" parameter.
Certainly it still accesses the main 'RequestWrapper' object (good, at least
I can see that) is there a similar object that has the parameters for the
Source cocoon:... URI?
(In which case could/should the VelocityGenerator detect it's invoked
'internally' and pass an appropriate something wapper?)

I think maybe cocoon.components.source.SiteMapSource builds something
suitable (this.uri)?

David
PS Archives don't say much about cinclude

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message