이 문서는 https://tiddlywiki.com/languages/ko-KR/에서 티들리위키의 정적 HTML 표현의 일부입니다

Transclusion Basic Usage

2014년 11월 30일 오후 7:48

Simple Transclusion

To include some content from TiddlerA into TiddlerB, edit the latter to include the following text:

This is the content of TiddlerA: {{TiddlerA}}

The result is that the content of the text field (i.e. the main content) of TiddlerA is rendered within TiddlerB.

Usage

The notation {{TiddlerA}} is a shortcut for {{TiddlerA!!text}}. This is because the default field for transclusion is text, but any other field can be used explicitly. For example, you can print the last time TiddlerA was modified using:

TiddlerA was modified on {{TiddlerA!!modified}}

By omitting the tiddler title, the transclusion notation can also be used to display the content of a field from the current tiddler, for example:

The current tiddler was modified on {{!!modified}}

Recursion Errors

Notice that using {{!!text}} or {{}} causes an error (Recursive transclusion error in transclude widget), because it does not make sense to include the content of the current tiddler into the content of the current tiddler (that is, into itself). Whenever you encouter this error message, it means that you are trying to include something into itself, directly or indirectly (for example if tiddler A transcludes tiddler B which transcludes tiddler C which, in turn, transcludes tiddler A).

Learning More

In TiddlyWiki, transclusions are not limited to including raw content like the above. To learn about more advanced uses of transclusion, see Transclusion with Templates.

See also: