1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-24 10:37:20 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/wikitext/Transclusion in WikiText.tid
Jermolene 376b447570 Documentation tweaks
@erwanm I ended up making some fairly extensive tweaks.

One issue is that the (excellent) material you’ve provided on
transclusion with templates covers very much the same ground as the
existing TemplateTiddlers tiddler. The existing text was focused on
transclusion with widgets; I think your material using transclusion
notation is much easier to understand.

I’ve also removed the exercises section. We don’t have exercises
elsewhere in the documentation, so I think we need to make a conscious
decision about whether we’re going to try to add them, and then do so
consistently across the material.

I also made some changes to bring the text into house style for
consistency (which I’ve also tried to start documenting).
2014-12-10 17:08:59 +00:00

35 lines
1.2 KiB
Plaintext

created: 20131205160146648
modified: 20140317214256948
tags: WikiText
title: Transclusion in WikiText
type: text/vnd.tiddlywiki
caption: Transclusion
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 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 [[filter|Filters]]:
```
{{{ [tag[mechanism]] }}}
{{{ [tag[mechanism]] ||TemplateTitle}}}
```
See also:
* [[Transclusion Basic Usage]]
* [[Transclusion with Templates]]
* TemplateTiddlers
* TranscludeWidget
* [[Confusion between Transclusion and Substitution]]