Note: An alternative skin, TW4MW (work in progress), is available from the user preferences.
TemplatePlugin
TiddlyWiki Community Wiki
| Name: | TemplatePlugin |
| Author : | jayfresh |
| URL : | #TemplatePlugin |
| Description : | Collection of functions to support rendering of tiddlers through HTML templates |
| Version : | 0.0.4 |
- CodeRepository: http://svn.tiddlywiki.org/Trunk/contributors/JonathanLister/plugins/TemplatePlugin.js
- License: BSDLicense
- TiddlyWiki CoreVersion: 2.3
Installing the TemplatePlugin allows you to render tiddlers through HTML templates. It provides you with the following macros:
- templateTiddlers
- templateTags
In addition, TemplatePlugin defines the following function:
- expandTemplate (this depends on TemplateFormatterPlugin)
TemplatePlugin supports 'TiddlyTemplating', which is described on the TiddlyTemplating page. This introduces a template-based mechanism for publishing files from a TiddlyWiki (and replacing the core saving mechanism).
Contents |
[edit] templateTiddlers macro
[edit] Usage
<<templateTiddlers template:RssTemplate filter:"[tag[!excludeLists]]">> <<templateTiddlers RssTemplate filter:"[tag[!excludeLists]]">>
Parameters can be:
- template - the name of the template
- filter - a tiddler filter
- wikitext - if true, renders the target tiddler's text as wikitext instead of using the special template formatter
- raw - if true, adds the HTML to place without encoding it as text
If a parameter does not have a qualifier, it is assumed to be the template name.
[edit] Description
Calling the templateTiddlers collects a set of tiddlers (as returned using the filter string provided) and wikifies the HTML template using each tiddler as the context tiddler. When the special syntax of is found in the template, the macro is run. You can use this to nest calls to templateTiddlers as well as run other macros e.g. the view macro.
[edit] templateTags macro
[edit] Usage
<<templateTags template:RssItemCategoryTemplate>> <<templateTiddlers RssTemplate>>
Parameters can be:
- template - the name of the template
[edit] Description
This is much like the templateTiddlers macro, but applies to a single tiddler's tags rather than a set of tiddlers.

