Edgewall Software

Changes between Version 7 and Version 8 of GenshiRecipes/PyExtendsEquivalent

Show
Ignore:
Timestamp:
12/03/09 02:25:01 (5 years ago)
Author:
kvamlnk@…
Comment:

I used the 4 line sample code to start experimenting and testing with templates and was mystified with my XInclude failures.

Legend:

Unmodified
Added
Removed
Modified
  • GenshiRecipes/PyExtendsEquivalent

    v7 v8  
    3737}}} 
    3838 
    39 The “trick” here is that the base template is included at the top of the page template. This results in the template function `display_errors()` being available to the page template, and the match template being applied to the output generated by the page template. 
     39The “trick” here is that the base template is included at the top of the page template. This results in the template function `display_errors()` being available to the page template, and the match template being applied to the output generated by the page template.  If you write python code to directly run this example, be sure to use the TemplateLoader class to load `page.html`.  If you use the MarkupTemplate class, XInclude processing is silently disabled. 
    4040 
    4141When rendered, these will produce the following output: