diff --git a/editions/tw5.com/tiddlers/wikitext/Transclusion in WikiText.tid b/editions/tw5.com/tiddlers/wikitext/Transclusion in WikiText.tid index 651a02ba6..8cf4acd7a 100644 --- a/editions/tw5.com/tiddlers/wikitext/Transclusion in WikiText.tid +++ b/editions/tw5.com/tiddlers/wikitext/Transclusion in WikiText.tid @@ -1,9 +1,11 @@ +caption: Transclusion created: 20131205160146648 -modified: 20140317214256948 +modified: 20141230090901681 tags: WikiText title: Transclusion in WikiText type: text/vnd.tiddlywiki -caption: Transclusion + +! Introduction You can incorporate the content of one tiddler within another using the [[Transclusion]] notation: @@ -11,6 +13,8 @@ You can incorporate the content of one tiddler within another using the [[Transc * `{{MyTiddler||TemplateTitle}}` displays the tiddler through a specified [[TemplateTiddler|TemplateTiddlers]] * `{{||TemplateTitle}}` displays the specified template tiddler without altering the CurrentTiddler +!! Transcluding Text References + You can also use a TextReference instead of a tiddler title: * `{{MyTiddler!!field}}` transcludes a specified field of a tiddler @@ -18,6 +22,8 @@ You can also use a TextReference instead of a tiddler title: * `{{MyTiddler##index}}` transcludes a specified indexed property of a [[DataTiddler|DataTiddlers]] * `{{##index}}` transcludes a specified indexed property of the current [[DataTiddler|DataTiddlers]] +!! Filtered Transclusion + A similar syntax can be used to transclude a list of tiddlers matching a specified [[filter|Filters]]: ``` @@ -25,6 +31,16 @@ A similar syntax can be used to transclude a list of tiddlers matching a specifi {{{ [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"/> + +``` + See also: * [[Transclusion Basic Usage]]