1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-04 17:16:18 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/variables/WidgetVariable_ currentTiddler.tid
2015-01-07 16:18:36 +01:00

41 lines
1.3 KiB
Plaintext

caption: currentTiddler
created: 20141001232824187
modified: 20150107121000000
tags: Variables
title: WidgetVariable: currentTiddler
type: text/vnd.tiddlywiki
The ''currentTiddler'' [[variable|Variables]] contains the title of the current tiddler.
!! Usage
Various [[Widgets]] and [[Macros]] are by default applied with respect to the tiddler referenced via ''currentTiddler''. Within the [[ListWidget]] or TemplateTiddlers you are thus often not required to specify the tiddler title.
The following two examples are thus equivalent...
* `<$view field=title/>`
* `<$view field=title tiddler=<<currentTiddler>>/>`
;TranscludeWidget
: when [[transcluding|Transclusion]] a tiddler, ''currentTiddler'' is set to the tiddler being transcluded,
: e.g. when using the [[WikiText shorthand|Transclusion in WikiText]]: `{{||TemplateTiddlerTitle}}`
; ListWidget
: overrides the ''currentTiddler'' variable with the currently iterated list-item,
: unless a custom `variable` attribute is specified
; TiddlerWidget
: sets the ''currentTiddler'' variable for its inner scope
!! Example
```
<$view tiddler=<<currentTiddler>> field=title/>
```
<<<
<$view tiddler=<<currentTiddler>> field=title/>
<<<
!! Other Standard Variables
* [[WidgetVariable: storyTiddler]]
* [[WidgetVariable: transclusion]]