2014-01-07 11:57:42 +00:00
created: 20140107114355828
2014-03-17 21:44:10 +00:00
modified: 20140317213147507
2014-09-11 14:52:47 +00:00
tags: Concepts
2014-01-07 11:57:42 +00:00
title: TemplateTiddlers
type: text/vnd.tiddlywiki
2014-12-10 17:08:59 +00:00
A template tiddler is not actually a type of tiddler, it is a role in which a tiddler can be used.
2014-01-07 11:57:42 +00:00
2014-12-10 17:08:59 +00:00
Templates are a way to re-use chunks of WikiText.
2014-01-07 11:57:42 +00:00
2014-12-10 17:08:59 +00:00
Transcluding through a template extends the basic functionality of [[Transclusion]] by combining two tiddlers:
2014-01-07 11:57:42 +00:00
2014-12-10 17:08:59 +00:00
* A template tiddler that contains the WikiText to be displayed. It can contain transclusions that reference fields in the CurrentTiddler
* A target tiddler that identifies the CurrentTiddler to be used when resolving references to fields
2014-01-07 11:57:42 +00:00
2014-12-10 17:08:59 +00:00
The best example of templating is the main story river in TiddlyWiki. Each tiddler in the story river is rendered through a ViewTemplate that specifies how each field is to be rendered.
2014-01-07 11:57:42 +00:00
2014-12-10 17:08:59 +00:00
See [[Transclusion with Templates]] for details.