mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-11 09:50:27 +00:00
Docs updates
This commit is contained in:
parent
f2409d4245
commit
d57010d2fb
@ -1,6 +0,0 @@
|
||||
created: 201308251449
|
||||
modified: 201308251449
|
||||
tags: concepts
|
||||
title: ContextTiddler
|
||||
|
||||
The ContextTiddler is the current tiddler during WikiText processing. A context tiddler is set by the TiddlerWidget. It allows you to write references like `<$view field="title" format="link"/>` in TiddlerTemplates without explicitly specifying the tiddler that it applies to.
|
7
editions/tw5.com/tiddlers/concepts/CurrentTiddler.tid
Normal file
7
editions/tw5.com/tiddlers/concepts/CurrentTiddler.tid
Normal file
@ -0,0 +1,7 @@
|
||||
created: 20130825144900000
|
||||
modified: 20140107114307809
|
||||
tags: concepts
|
||||
title: CurrentTiddler
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The CurrentTiddler is the current tiddler during WikiText processing. A context tiddler is set by the TiddlerWidget. It allows you to write references like `<$view field="title" format="link"/>` in TemplateTiddlers without explicitly specifying the tiddler that it applies to.
|
40
editions/tw5.com/tiddlers/concepts/TemplateTiddlers.tid
Normal file
40
editions/tw5.com/tiddlers/concepts/TemplateTiddlers.tid
Normal file
@ -0,0 +1,40 @@
|
||||
created: 20140107114355828
|
||||
modified: 20140107114636001
|
||||
tags: concepts
|
||||
title: TemplateTiddlers
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
A template tiddler is not in fact a type of tiddler, it is a role in which a tiddler can be used.
|
||||
|
||||
When text is wikified there is the concept of the CurrentTiddler. Certain widgets (like the ViewWidget) can use the current tiddler implicitly. For example:
|
||||
|
||||
```
|
||||
<$view tiddler="HelloThere" field="myfield"/> - displays the field "myfield" of the tiddler HelloThere
|
||||
<$view field="myfield"/> - displays the field "myfield" of the current tiddler
|
||||
```
|
||||
|
||||
When the TranscludeWidget pulls in the content from another tiddler, by default it does not change the current tiddler, so the transcluded content behaves as if it were in the context of the transcluding tiddler.
|
||||
|
||||
So, if we have a tiddler "A" that contains:
|
||||
|
||||
```
|
||||
<$view field="myfield"/>
|
||||
```
|
||||
|
||||
And then transclude it from a tiddler "B" like so:
|
||||
|
||||
```
|
||||
My field value is: <$transclude tiddler="A"/>
|
||||
```
|
||||
|
||||
The result will be that the field from the tiddler "B" is displayed; in other words, tiddler "A" is acting as a template for displaying information from tiddler "B".
|
||||
|
||||
The TiddlerWidget is used to change the current tiddler. Consider a tiddler "C" containing:
|
||||
|
||||
```
|
||||
<$tiddler tiddler="A"><$transclude tiddler="A"/></$tiddler>
|
||||
```
|
||||
|
||||
It is still transcluding tiddler "A", but now it is also setting the current tiddler to "A". The result is therefore that the field "myfield" for tiddler "A" is displayed.
|
||||
|
||||
The shorthand syntax for transcluding actually generates both a TiddlerWidget and a TranscludeWidget.
|
@ -1,5 +1,5 @@
|
||||
created: 20130827080000000
|
||||
modified: 20140101183713761
|
||||
modified: 20140107114229585
|
||||
tags: concepts
|
||||
title: TiddlerFilters
|
||||
type: text/vnd.tiddlywiki
|
||||
@ -69,7 +69,7 @@ The operands available with the `is` operator are:
|
||||
* ''tiddler'': selects all tiddlers excluding shadows, whether or not they are SystemTiddlers
|
||||
* ''system'': selects all SystemTiddlers
|
||||
* ''shadow'': selects all ShadowTiddlers
|
||||
* ''current'': selects the current ContextTiddler
|
||||
* ''current'': selects the CurrentTiddler
|
||||
* ''missing'': selects all MissingTiddlers
|
||||
* ''orphan'': selects all OrphanTiddlers
|
||||
|
||||
|
@ -1,14 +1,15 @@
|
||||
created: 201308241543
|
||||
modified: 201310301351
|
||||
created: 20130824154300000
|
||||
modified: 20140107114152456
|
||||
tags: widget
|
||||
title: TiddlerWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
! Introduction
|
||||
|
||||
The TiddlerWidget sets the ContextTiddler that applies for processing its content.
|
||||
The TiddlerWidget sets the CurrentTiddler that applies for processing its content.
|
||||
|
||||
! Content and Attributes
|
||||
|
||||
|!Attribute |!Description |
|
||||
|tiddler |The title of the tiddler to become the new ContextTiddler |
|
||||
|tiddler |The title of the tiddler to become the new CurrentTiddler |
|
||||
|class |CSS classes to added to the generated elements |
|
||||
|
@ -1,5 +1,5 @@
|
||||
created: 20131205160146648
|
||||
modified: 20131205160204570
|
||||
modified: 20140107114340951
|
||||
tags: wikitext
|
||||
title: Transclusion in WikiText
|
||||
type: text/vnd.tiddlywiki
|
||||
@ -7,7 +7,7 @@ type: text/vnd.tiddlywiki
|
||||
You can incorporate the content of one tiddler within another using the transclusion notation:
|
||||
|
||||
* `{{MyTiddler}}` transcludes a single tiddler
|
||||
* `{{MyTiddler||TemplateTitle}}` displays the tiddler through a specified [[TiddlerTemplate|TiddlerTemplates]]
|
||||
* `{{MyTiddler||TemplateTitle}}` displays the tiddler through a specified [[TemplateTiddler|TemplateTiddlers]]
|
||||
|
||||
A similar syntax can be used to transclude a list of tiddlers matching a specified [[TiddlerFilter|TiddlerFilters]]:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user