Search:
There are various approaches to templating within a Lenya publication. The XHTML approach is effective under the following conditions:
If these conditions are met, it is possible to define the overall layout of a page in a XHTML document, using tools like Dreamweaver. Special placeholders need to be inserted to indicate where Lenya elements should later be substituted. This can be done by inserting <div id="navigation" /> as the placeholder for the navigation, for instance, or <div id="cmsbody" /> for the body part of a page.
If these XHTML documents are finished, they can then be called from Lenya, and the placeholders be substituted with CMS content. Schematically, this process looks as follows:
1)
XML document (article) ->
XML document (navigation) -> Aggregation to one XML document
XHTML template ->
2)
aggregated XML document -> Processing with XSLT
Step 2) identifies the various placeholders ( <div id="navigation" /> and <div id="cmsbody" /> in this example) and applies XSL transformations to substitute the placeholders with the transformed contents of (navigation, article) respectively.
What are the advantages of this approach?
What are the pitfalls of this approach?