1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-14 22:04:51 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/widgets/TiddlerWidget.tid

37 lines
1.3 KiB
Plaintext
Raw Normal View History

2014-01-07 11:57:42 +00:00
created: 20130824154300000
2014-08-02 12:39:02 +00:00
modified: 20140802114152456
2014-09-10 23:06:19 +00:00
tags: Widgets
title: TiddlerWidget
2014-01-07 11:57:42 +00:00
type: text/vnd.tiddlywiki
2014-09-10 23:06:19 +00:00
caption: tiddler
! Introduction
2014-01-07 11:57:42 +00:00
The TiddlerWidget sets the CurrentTiddler that applies for processing its content.
! Content and Attributes
|!Attribute |!Description |
2014-01-07 11:57:42 +00:00
|tiddler |The title of the tiddler to become the new CurrentTiddler |
2014-08-04 12:31:52 +00:00
|class |CSS classes to be added to the generated elements |
2014-08-02 12:39:02 +00:00
! CSS Class Variables
The tiddler widget assigns several useful CSS classes to variables that it creates:
* ''missingTiddlerClass'': ''"tc-tiddler-exists"'' or ''"tc-tiddler-missing"'' depending upon whether the target tiddler exists
* ''shadowTiddlerClass'': ''"tc-tiddler-shadow"'' if the tiddler is a shadow tiddler
* ''systemTiddlerClass'': ''"tc-tiddler-system"'' if the tiddler is a system tiddler
* ''tiddlerTagClasses'': A space separated list of CSS classes named ''"tc-tagged-{tagname}"''. For example ''"tc-tagged-introduction"''. Note that tag names are UrlEncoded which means that the tag ''$:/tags/Macro'' appears as the CSS class ''"tc-tagged-%24%3A%2Ftags%2FMacro"''
2014-08-02 12:39:02 +00:00
You can use these variables like this:
```
<$tiddler tiddler="MyOtherTiddler">
<div class=<<missingTiddlerClass>>>
<$transclude/>
</$tiddler>
```
See also [[$:/core/ui/ViewTemplate]].