You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Torsten Schlabach <TS...@gmx.net> on 2004/08/31 17:59:59 UTC
Using XInclude to include other pages as chunks into an aggregated page
Dear list,
I am trying to achieve this:
On the homepage of my site (publication) I want to be able to aggregate
content from several separate pages in Lenya. I want to keep them separate
for purposes of distributed editing and other resons.
This is what I have done:
I have been introducing a XInclude-Transformer so I can have an aggregatinng
page with several xi:include statements that should include other pages from
Lenya.
This is the problems / questions I have:
- Should this be done that way? Did I overlook a better way to to that.
- I have used xi:include href="cocoon:/lenya-document-view/..." to make sure
I will include an xhtml document even if the document I try to include is
not straight xhtml. For example, I have a gallery doctype in my publication
which will render a list of image names (custom XML) as a gallery in xhtml
through the existing custom doctype mechanism.
This all works fine except that I so far hard-coded all the parameters in
the href= piece. I have no idea where to look for if I want to use
variables. For example, when Live I need to use .../live/... and not
.../authoring/... .
I am open to comments and hints.
I did not post this on the Cocoon Users list because to me this is a
question of Lenya philosophy in the frist place. (Should it be done like
that or different?) I am not sure if a URL rewriting transformer could do
the trick, but even it it could, how would that interfer with the rest of
the Lenya framework?
Regards,
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: Using XInclude to include other pages as chunks into an aggregated
page
Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Torsten Schlabach wrote:
> Dear list,
>
> I am trying to achieve this:
>
> On the homepage of my site (publication) I want to be able to aggregate
> content from several separate pages in Lenya. I want to keep them separate
> for purposes of distributed editing and other resons.
>
> This is what I have done:
>
> I have been introducing a XInclude-Transformer so I can have an aggregatinng
> page with several xi:include statements that should include other pages from
> Lenya.
>
> This is the problems / questions I have:
>
> - Should this be done that way? Did I overlook a better way to to that.
xinclude and map:aggregate can be used to do the same thing. i prefer to
use map:aggregate for clarity but would not mind to use it for one-offs.
> - I have used xi:include href="cocoon:/lenya-document-view/..." to make sure
> I will include an xhtml document even if the document I try to include is
> not straight xhtml. For example, I have a gallery doctype in my publication
> which will render a list of image names (custom XML) as a gallery in xhtml
> through the existing custom doctype mechanism.
>
> This all works fine except that I so far hard-coded all the parameters in
> the href= piece. I have no idea where to look for if I want to use
> variables. For example, when Live I need to use .../live/... and not
> .../authoring/... .
this would probably be easier in the sitemap because you have access to
input modules. for xsl, you would have to pass them in.
--
Gregor J. Rothfuss
Wyona Inc. - Open Source Content Management - Apache Lenya
http://wyona.com http://cocoon.apache.org/lenya
gregor.rothfuss@wyona.com gregor@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: Using XInclude to include other pages as chunks into an aggregated
page
Posted by Jean Pierre LeJacq <jp...@quoininc.com>.
On Tue, 31 Aug 2004, Torsten Schlabach wrote:
> On the homepage of my site (publication) I want to be able to aggregate
> content from several separate pages in Lenya. I want to keep them separate
> for purposes of distributed editing and other resons.
>
> This is what I have done:
>
> I have been introducing a XInclude-Transformer so I can have an aggregatinng
> page with several xi:include statements that should include other pages from
> Lenya.
>
> This is the problems / questions I have:
>
> - Should this be done that way? Did I overlook a better way to to that.
xinclude (and cinclude) are an alternate to aggregation. Lenya
tends to use aggregation more often. I prefer the xinclude approach
myself and use it in all our publications.
> - I have used xi:include href="cocoon:/lenya-document-view/..." to make sure
> I will include an xhtml document even if the document I try to include is
> not straight xhtml. For example, I have a gallery doctype in my publication
> which will render a list of image names (custom XML) as a gallery in xhtml
> through the existing custom doctype mechanism.
>
> This all works fine except that I so far hard-coded all the parameters in
> the href= piece. I have no idea where to look for if I want to use
> variables. For example, when Live I need to use .../live/... and not
> .../authoring/... .
This is a limitation of xinclude. The way we get around this is to
parameterize the href piece and have a simple transformer that does
parameter substition before invoking the xinclude transformer. You
could also use the JX generator for this parameterization.
--
JP
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org