You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Peter Shipley <ps...@nomensa.com> on 2004/01/20 16:32:53 UTC

Multiple templates in a single publication?

Hi,

Is there any current solution (that I may have missed) to include two 
templates in a single publication (I am using the "default" publication 
as my basis for this)
The goal being to create a document using a choice of templates that 
could be applied (ergo different XSL files) and have this is an option 
under the "site" tab so it can be changed at any time.

Perhaps some further clarification. Imagine a publication (website) that 
has a series of documents based on a defined 'standard' style - so the 
normal "default" style to transform to xhtml. Now what if we wanted to 
add a different template for non-standard pages (perhaps display that 
content in a different manner using a different XSLT) which feature a 
lot of content/table data. How can we select, when we create a page, 
which XSL should be applied for the transformation ?

I haven't been using this for very long so bear with me.

Regards

Peter


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


Re: Multiple templates in a single publication?

Posted by Andreas Hartmann <an...@apache.org>.
Peter Shipley wrote:

> Hi,
> 
> Is there any current solution (that I may have missed) to include two 
> templates in a single publication (I am using the "default" publication 
> as my basis for this)
> The goal being to create a document using a choice of templates that 
> could be applied (ergo different XSL files) and have this is an option 
> under the "site" tab so it can be changed at any time.
> 
> Perhaps some further clarification. Imagine a publication (website) that 
> has a series of documents based on a defined 'standard' style - so the 
> normal "default" style to transform to xhtml. Now what if we wanted to 
> add a different template for non-standard pages (perhaps display that 
> content in a different manner using a different XSLT) which feature a 
> lot of content/table data. How can we select, when we create a page, 
> which XSL should be applied for the transformation ?

In Lenya, this is solved by the concept of "document types".
A document type is a "kind of document" with its own schema,
editing capabilities, presentation (XSLT), ...

When you create a page, you choose the document type.
In the sitemap, the XSLT is chosen dynamically depending
on the document type. But how to implement this is
quite up to you.

This is just a short introduction, maybe you find more
hints in the documentation (especially

- the URIParameterizer,
- the config/doctypes directory,
- parameter-doctype.xmap and
- {page-envelope:document-type}).

-- Andreas


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