1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-28 04:19:56 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/concepts/TemplateTiddlers.tid

19 lines
860 B
Plaintext
Raw Normal View History

2014-01-07 11:57:42 +00:00
created: 20140107114355828
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
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
Templates are a way to re-use chunks of WikiText.
2014-01-07 11:57:42 +00:00
Transcluding through a template extends the basic functionality of [[Transclusion]] by combining two tiddlers:
2014-01-07 11:57:42 +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
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
See [[Transclusion with Templates]] for details.