Changes between Version 29 and Version 30 of GenshiFaq
- Timestamp:
- Dec 8, 2006, 10:55:27 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GenshiFaq
v29 v30 109 109 Yes and no. Technically, it is possible to add custom directives by making a subclass of `MarkupTemplate` or `TextTemplate`. However, think twice before doing that. Genshi has been designed to get by with a standard set of generic directives; adding additional ones should not be necessary. 110 110 111 Match templates provide much of the functionality you may want to get from custom directives, and are more convenient to boot. For example, let's assume you want a widget library. Instead of writing your own template directives, add an include file defining a couple match templates. As a simple e ample, assume the following is stored a file called `widgets.html`:111 Match templates provide much of the functionality you may want to get from custom directives, and are more convenient to boot. For example, let's assume you want a widget library. Instead of writing your own template directives, add an include file defining a couple match templates. As a simple example, assume the following is stored a file called `widgets.html`: 112 112 113 113 {{{