1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-27 10:30:28 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/wikitext/Transclusion in WikiText.tid
Jermolene bdbbf94326 Update transclusion wikitext syntax to allow a template without a target tiddler
This allows us to transclude a tiddler without changing the current
tiddler with `{{||MyTiddler}}`.
2014-03-17 21:44:10 +00:00

26 lines
1.1 KiB
Plaintext

created: 20131205160146648
modified: 20140317214256948
tags: wikitext
title: Transclusion in WikiText
type: text/vnd.tiddlywiki
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|TemplateTiddlers]]
* `{{||TemplateTitle}}` displays the specified template tiddler without altering the [[current tiddler|WidgetVariable: currentTiddler]]
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|DataTiddlers]]
* `{{##index}}` transcludes a specified indexed property of the current [[DataTiddler|DataTiddlers]]
A similar syntax can be used to transclude a list of tiddlers matching a specified [[TiddlerFilter|TiddlerFilters]]:
```
{{{ [tag[mechanism]] }}}
{{{ [tag[mechanism]] ||TemplateTitle}}}
```