This page is part of a static HTML representation of the TiddlyWiki at http://tiddlywiki.com/

Transclusion in WikiText

20th February 2015 at 4:13pm
WikiText

Introduction

You can incorporate the content of one tiddler within another using the Transclusion notation:

  • {{MyTiddler}} transcludes a single tiddler
  • {{MyTiddler||TemplateTitle}} displays the tiddler through a specified TemplateTiddler
  • {{||TemplateTitle}} displays the specified template tiddler without altering the current tiddler

Transcluding Text References

You can also use a TextReference instead of a tiddler title:

  • {{MyTiddler!!field}} transcludes a specified field of a tiddler
  • {{!!field}} transcludes a specified field of the current tiddler
  • {{MyTiddler##index}} transcludes a specified indexed property of a DataTiddler
  • {{##index}} transcludes a specified indexed property of the current DataTiddler

Filtered Transclusion

A similar syntax can be used to transclude a list of tiddlers matching a specified filter:

{{{ [tag[mechanism]] }}}
{{{ [tag[mechanism]] ||TemplateTitle}}}

Generated Widgets

The WikiText transclusion syntax generates a TiddlerWidget wrapped around a TranscludeWidget. For example, {{MyTiddler||MyTemplate!!myField}} generates the following pair of widgets:

<$tiddler tiddler="MyTiddler">
<$transclude tiddler="MyTemplate" field="myField"/>
</$tiddler>

See also: