1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-07 18:39:57 +00:00
TiddlyWiki5/tw2/source/tiddlywiki.com/tiddlywiki-com-ref/tiddler_macro.tid
Jeremy Ruston a1c8ac624f Added first pass at support for building TiddlyWiki 2.6.x with TW5
There are still some whitespace and attribute ordering issues, but the
result runs correctly.
2012-05-29 22:02:38 +01:00

36 lines
1.0 KiB
Plaintext

title: tiddler macro
modifier: jermolene
created: 20110211143954
modified: 20110228144138
tags: macro
creator: colmbritton
The tiddler macro allows you to [[transclude|Tranclusion]] the text of other tidders, or sections of other tiddlers, into your current tiddler.
!!Basic Usage
The basic usage is:
{{{
<<tiddler tiddlerToTransclude>>
}}}
This displays as:
<<<
<<tiddler tiddlerToTransclude>>
<<<
Have a look at the actual [[tiddlerToTransclude]] tiddler.
!!Transcluding Sections and Slices
Instead of transcluding an entire tiddler, you can also transclude individual [[slices|Tiddler Slices]] or [[sections|Tiddler Sections]]:
{{{
<<tiddler [[Title::sliceLabel]]>>
<<tiddler [[Title##sectionHeading]]>>
}}}
!!Parameterised Transclusion
Using the {{{with:}}} parameter, placeholders in the transcluded content can be replaced with a desired value. For example:
{{{
<<tiddler anotherTiddlerToTransclude with:"Jim" "Oz">>
}}}
Which displays as:
<<<
<<tiddler anotherTiddlerToTransclude with:"Jim" "Oz">>
<<<
Have a look at the actual [[anotherTiddlerToTransclude]].