2014-10-02 15:02:48 +00:00
caption: currentTiddler
created: 20141001232824187
2015-01-07 15:18:36 +00:00
modified: 20150107121000000
2014-10-02 15:02:48 +00:00
tags: Variables
title: WidgetVariable: currentTiddler
type: text/vnd.tiddlywiki
2015-01-07 15:18:36 +00:00
The ''currentTiddler'' [[variable|Variables]] contains the title of the current tiddler.
2014-10-02 23:15:06 +00:00
2015-01-07 15:18:36 +00:00
!! Usage
2014-10-02 15:02:48 +00:00
2015-01-07 15:18:36 +00:00
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.
2014-10-02 15:02:48 +00:00
2015-01-07 15:18:36 +00:00
The following two examples are thus equivalent...
2014-10-02 15:02:48 +00:00
2015-01-07 15:18:36 +00:00
* `<$view field=title/>`
* `<$view field=title tiddler=<<currentTiddler>>/>`
2014-10-02 23:15:06 +00:00
2015-01-07 15:18:36 +00:00
;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
2014-10-02 15:02:48 +00:00
2015-01-07 15:18:36 +00:00
!! Example
2014-10-02 15:02:48 +00:00
2015-01-07 15:18:36 +00:00
```
<$view tiddler=<<currentTiddler>> field=title/>
```
<<<
<$view tiddler=<<currentTiddler>> field=title/>
<<<
!! Other Standard Variables
* [[WidgetVariable: storyTiddler]]
* [[WidgetVariable: transclusion]]