Changes between Version 10 and Version 11 of MarkupTemplates
- Timestamp:
- Jul 9, 2006, 7:51:17 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MarkupTemplates
v10 v11 3 3 The most important feature provided by the Markup package is a template engine. 4 4 5 Templates are XML files of some kind (such as XHTML) that include '' processing directives'' identified by the namespace `http://markup.edgewall.org/` and ''template expressions'' that are dynamically substituted by variable data.5 Templates are XML files of some kind (such as XHTML) that include ''[wiki:MarkupTemplates#TemplateDirectives processing directives]'' (elements or attributes identified by a separate namespace) that affect how the template is rendered, and ''[wiki:MarkupTemplates#TemplateExpressions template expressions]'' that are dynamically substituted by variable data. 6 6 7 7 [[PageOutline(2-3, Table of Contents, inline)]] … … 57 57 == Template Directives == 58 58 59 ''Directives'' are elements and/or attributes in the template that are identified by the namespace `http://markup.edgewall.org/`. They can affect how the template is rendered in a number of ways: Markup provides directives for conditionals and looping, among others. 60 61 To use directives in a template, the namespace should be declared, which is usually done on the root element: 62 63 {{{ 64 <html xmlns="http://www.w3.org/1999/xhtml" 65 xmlns:py="http://markup.edgewall.org/" 66 lang="en"> 67 ... 68 </html> 69 }}} 70 71 In this example, the default namespace is set to the XHTML namespace, and the namespace for Markup directives is bound to the prefix “py”. 72 59 73 === `py:content` === 60 74