Changes between Version 26 and Version 27 of GenshiFaq
- Timestamp:
- Oct 6, 2006, 1:18:25 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GenshiFaq
v26 v27 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 instead. As a simple eample, 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 eample, assume the following is stored a file called `widgets.html`: 112 112 113 113 {{{