lenya-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Geldner" <geldner.list....@gmx.net>
Subject Re: share sites between publications
Date Fri, 13 Mar 2009 09:07:56 GMT

Hi Andreas,

* I added a new page to my publication called "includetest".

* In the body of that page I added only one div element:
  <div id="refsea"></div>

* In the XSLT stylesheet webapps/lenya/lenya/pubs/mypub/xslt/page2xhtml.xsl I added the following
 <xsl:template match="xhtml:div[@id = 'refsea']">
    <ci:include src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"/>
(In the first step I only want to test including a page of the same publication, therefore
the parameter "pub" is missing. The referenced document is in the same publication.)

* When I open the page "includetest", this page is empty. The HTML source code of that page
looks like:
<!-- ... -->
<div id="main">
  <div id="body">
    <include xmlns="http://apache.org/cocoon/include/1.0" src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"
That means, Lenya has not transformed the include element.

* IMHO I have to add an include transformer to the publication sitemap, is it right? But when
I add something like that
  <map:match pattern="**/includetest.html">
    <map:transform type="cinclude"/>
Lenya says "Must set a generator before adding transformer 'cinclude'
". I think, I'm on the right way, but can you please provide my a hint of how to transform
the include element?

Thanks in advance!


> Datum: Thu, 12 Mar 2009 21:43:49 +0100
> Von: Andreas Hartmann <andreas@apache.org>
> An: user@lenya.apache.org
> Betreff: Re: share sites between publications

> Hi Lars,
> Lars Geldner schrieb:
> > Dear lenya users and developers,
> > 
> > we have two publications. How can we integrate a site of one
> > publication into another publication?
> with the term "site", are you referring to a single page (i.e., Lenya 
> document), or to a subsite (i.e., sub-sitetree)?
> > For example, we want to have a
> > link in the site tree of the first publication. When the user clicks
> > that link, a site of another publication should be opened in that
> > way, that only the site's content is displayed (within the frame of
> > this publication) but not the site tree of the second publication.
> If you want to include a page, you can just call it using the 
> lenya-document: protocol or using the site: protocol, appending the 
> format parameter for the format you need:
> <i:include src="lenya-document:{uuid},pub=…?format=xhtml"/>
> It is important to include the pub parameter because otherwise the 
> lenya-document source factory will look for the document only in the 
> current publication.
> HTH,
> -- Andreas
> -- 
> Andreas Hartmann, CTO
> BeCompany GmbH
> http://www.becompany.ch
> Tel.: +41 (0) 43 818 57 01

Nur bis 16.03.! DSL-Komplettanschluss inkl. WLAN-Modem für nur 
17,95 ¿/mtl. + 1 Monat gratis!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a

To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org

View raw message