You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Johnny Jones <ja...@hotmail.com> on 2004/12/17 01:42:03 UTC

multiple templates or page designs

Hi,

I posted a question on the user list about Page Fragment Context Editing 
with XInclude because I got stuck on the usecases (what to do with the 
sample code).   However, maybe this is not the best way to accomplish my 
goal.  There have been many questions on this list of the best way to 
accomplish different html layouts inside a publication that has pages such 
as:

1) front page that has the same header as the rest of the publication but 
does not aggregate in a menu navigation component and does aggregate in 
breadcrumbs
2) internal content pages that have the same header as the rest of the 
publication but does aggregate in a menu navigation component and does 
aggregate in breadcrumbs
3) sitemap page that has a different header as the rest of the publication 
and does not aggregate in any navigation components

Is Page Fragment Context Editing with XInclude the best way to accomplish 
this?  If so what am I supposed to do with the usecase sample code?

Thanks
Johnny

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement


---------------------------------------------------------------------
To unsubscribe, e-mail:              dev-unsubscribe@lenya.apache.org
For additional commands, e-mail:            dev-help@lenya.apache.org
Apache Lenya Project                          http://lenya.apache.org


Re: multiple templates or page designs

Posted by Jean Pierre LeJacq <jp...@quoininc.com>.
On Fri, 17 Dec 2004, Johnny Jones wrote:

> sample code).   However, maybe this is not the best way to accomplish my
> goal.  There have been many questions on this list of the best way to
> accomplish different html layouts inside a publication that has pages such
> as:
>
> 1) front page that has the same header as the rest of the publication but
> does not aggregate in a menu navigation component and does aggregate in
> breadcrumbs
> 2) internal content pages that have the same header as the rest of the
> publication but does aggregate in a menu navigation component and does
> aggregate in breadcrumbs
> 3) sitemap page that has a different header as the rest of the publication
> and does not aggregate in any navigation components

Obviously there are a lot of ways to implement these requirements.

What we do here is:

1) We use a single xhtml template file for a site that uses xinclude
   to aggregate all dynamic content such as navigation and
   breadcrumbs.  This is different that the cocoon aggregation
   approach that the Lenya default publication uses.

2) We then categorize each document using a transformer that adds a
   class attribute to the body element of the document.  For
   example,  class="home" or class="resume".

3) We use CSS to selectively hide or display different elements
   depending on the category of the document.  For example, the home
   document usually doesn't display the breadcrumb.

The advantages of this approach are:

1) single template for entire site and only one pipeline to process
   all documents.

2) CSS can be designed to support a single xhtml template structure.
   This allows reuse and substitutability of styles on the fly.

3) Superior W3C accessibility characteristics.

Hope this helps.

-- 
JP



---------------------------------------------------------------------
To unsubscribe, e-mail:              dev-unsubscribe@lenya.apache.org
For additional commands, e-mail:            dev-help@lenya.apache.org
Apache Lenya Project                          http://lenya.apache.org