diff --git a/editions/tw5.com/tiddlers/variables/Variables.tid b/editions/tw5.com/tiddlers/variables/Variables.tid index 1f52b5f3e..490987001 100644 --- a/editions/tw5.com/tiddlers/variables/Variables.tid +++ b/editions/tw5.com/tiddlers/variables/Variables.tid @@ -1,5 +1,5 @@ created: 20141002133113496 -modified: 20141002142932824 +modified: 20141002230631361 tags: Reference title: Variables type: text/vnd.tiddlywiki @@ -10,4 +10,6 @@ You can define your own [[Variables in WikiText]] or use built-in variables. More detailed information of built-in variables could be found in below: -<> \ No newline at end of file +<> + +See also DumpVariablesMacro \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/variables/WidgetVariable_ currentTiddler.tid b/editions/tw5.com/tiddlers/variables/WidgetVariable_ currentTiddler.tid index dee4ab522..e66fb5131 100644 --- a/editions/tw5.com/tiddlers/variables/WidgetVariable_ currentTiddler.tid +++ b/editions/tw5.com/tiddlers/variables/WidgetVariable_ currentTiddler.tid @@ -1,11 +1,12 @@ caption: currentTiddler created: 20141001232824187 -modified: 20141002133837818 +modified: 20141002161518301 tags: Variables title: WidgetVariable: currentTiddler type: text/vnd.tiddlywiki -<<< +! Mechanism + The ''currentTiddler'' variable containes the title of the current tiddler. The ListWidget assigns the list result to the ''currentTiddler'' variable, unless the `variable` attribute is specified. @@ -13,7 +14,8 @@ The ListWidget assigns the list result to the ''currentTiddler'' variable, unles A couple of [[Widgets]] and [[Macros]] by default apply to the tiddler according to the ''currentTiddler'' variable. The TranscludeWidget (or WikiText `{{||TemplateTitle}}`) transcludes a tiddler without changing the ''currentTiddler'' variable. -<<< + +! Using currentTiddler Variable These mechanisms together allow you to write references like `<$view field="title" format="link"/>` in TemplateTiddlers or inside the ListWidget hierarchy without explicitly specifying the tiddler that it applies to. diff --git a/editions/tw5.com/tiddlers/variables/WidgetVariable_ transclusion.tid b/editions/tw5.com/tiddlers/variables/WidgetVariable_ transclusion.tid index 63051d770..5526d4cf6 100644 --- a/editions/tw5.com/tiddlers/variables/WidgetVariable_ transclusion.tid +++ b/editions/tw5.com/tiddlers/variables/WidgetVariable_ transclusion.tid @@ -1,15 +1,16 @@ caption: transclusion created: 20141002004621385 -modified: 20141002133923307 +modified: 20141002162057822 tags: Variables title: WidgetVariable: transclusion type: text/vnd.tiddlywiki +! Mechanism The ''transclusion'' variable is set automatically by the transclude widget to contain a string that identifies the position of the current node within the widget tree. In the sidebar it is set to `{|$:/core/ui/PageTemplate/sidebar|||}` and within the tiddler "HelloThere" in the story river it is set to `{HelloThere|HelloThere|||}`. Each nested level of transclusion appends another curly bracketed list of symbols. The QualifyMacro uses the ''transclusion'' variable to identify the stack of transcluded tiddlers. -! Example: +! Example ``` \define mymacro() diff --git a/editions/tw5.com/tiddlers/wikitext/Variables in WikiText.tid b/editions/tw5.com/tiddlers/wikitext/Variables in WikiText.tid index 37cdead02..6ff83d226 100644 --- a/editions/tw5.com/tiddlers/wikitext/Variables in WikiText.tid +++ b/editions/tw5.com/tiddlers/wikitext/Variables in WikiText.tid @@ -1,11 +1,11 @@ +caption: Variables created: 20141002141231992 -modified: 20141002144153170 +modified: 20141002230751664 tags: WikiText title: Variables in WikiText type: text/vnd.tiddlywiki -caption: Hard Linebreaks -! Defining Variables +! Defining Variables Variables contains values defined by [[Widgets]]. Variables are available within the widget that defines them, and the child widgets in the widget tree. @@ -18,10 +18,11 @@ Variables are defined by: ! Using Variables -Variables are used with: +Variables are used in: * Variable substitution `$(name)$` * Concise shortcut `<>` * [[Filter expression|Introduction to Filters]] `[operator]` +* Some default behaviors of [[Widgets]] -Built-in [[variables|Variables]] are useful for dynamic WikiText. \ No newline at end of file +See also [[currentTiddler|WidgetVariable: currentTiddler]] variable and built-in [[variables|Variables]]. \ No newline at end of file