Note: An alternative skin, TW4MW (work in progress), is available from the user preferences.
Transclusion
TiddlyWiki Community Wiki
This page is still incomplete. You can help by contributing to its expansion.
Please improve the article, or discuss the issue on the talk page.
Using the Tiddler macro, contents of one tiddler can be embedded ("transcluded") from another tiddler:
<<tiddler [[Foo]]>>
Contents |
[edit] Partial Transclusion
With the use of slices and sections, specific parts can be transcluded from another tiddler:
<<tiddler [[tiddler::sliceLabel]]>> <<tiddler [[tiddler##sectionHeading]]>>
[edit] Examples
Tiddler: Slices
label1: lorem label2: ipsum label3: dolor |label4|sit| |label5|amet| |label6|consectetur|
<<tiddler [[Slices::label1]]>>
Tiddler: Sections
!Heading1 Lorem ipsum dolor sit amet. !Heading2 Consectetur adipisicing elit. !Heading3 Sed do eiusmod tempor incididunt ut labore.
<<tiddler [[Slices##Heading1]]>>
[edit] Parametric Transclusion
Using the NewTiddler macro's with: parameter, placeholders (%1-%9) in the transcluded contents can be replaced with the desired value:
<<tiddler [[Foo]] with:"bar" "baz" ...>>
[edit] Examples
Tiddler: QuoteTemplate
<<<
$1
<<<
{{{$2}}}
Tiddler: Quotations
<<tiddler [[QuoteTemplate]] with:"The quote." "The source.">>
cf. [tw] templates / transclusion (parametric)
[edit] Editing Transcluded Contents
- TiddlerWithEditPlugin: adds "double-click to edit source" capabilities to the core Tiddler macro
- EditTiddlerPlugin: embeds an "edit" link in tiddler content to invoke edit on any specified tiddler title

