mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-25 09:30:28 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
0f79dfea17
@ -57,7 +57,7 @@ TiddlerWidget.prototype.getTagClasses = function() {
|
||||
if(tiddler) {
|
||||
var tags = [];
|
||||
$tw.utils.each(tiddler.fields.tags,function(tag) {
|
||||
tags.push("tw-tag-" + encodeURIComponent(tag));
|
||||
tags.push("tw-tagged-" + encodeURIComponent(tag));
|
||||
});
|
||||
return tags.join(" ");
|
||||
} else {
|
||||
|
@ -9,8 +9,6 @@ $:/config/PageControlButtons/Visibility/$(listItem)$
|
||||
|
||||
<<lingo Basics/Version/Prompt>> <<version>>
|
||||
|
||||
---
|
||||
|
||||
<$set name="tw-config-toolbar-icons" value="yes">
|
||||
|
||||
<$set name="tw-config-toolbar-text" value="yes">
|
||||
@ -31,23 +29,4 @@ $:/config/PageControlButtons/Visibility/$(listItem)$
|
||||
|
||||
---
|
||||
|
||||
<<lingo Tools/Import/Prompt>> <$browse/>
|
||||
|
||||
---
|
||||
|
||||
{{$:/snippets/encryptionstatus}}
|
||||
|
||||
---
|
||||
|
||||
|
||||
---
|
||||
|
||||
{{$:/snippets/viewswitcher}}
|
||||
|
||||
---
|
||||
|
||||
{{$:/snippets/minithemeswitcher}}
|
||||
|
||||
---
|
||||
|
||||
{{$:/snippets/languageswitcher}}
|
||||
|
@ -5,3 +5,5 @@ 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.
|
||||
|
||||
The title of the current tiddler is contained in the widget variable ''currentTiddler''.
|
||||
|
@ -1,5 +1,5 @@
|
||||
created: 20130824154300000
|
||||
modified: 20140107114152456
|
||||
modified: 20140802114152456
|
||||
tags: widget
|
||||
title: TiddlerWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@ -13,3 +13,23 @@ The TiddlerWidget sets the CurrentTiddler that applies for processing its conten
|
||||
|!Attribute |!Description |
|
||||
|tiddler |The title of the tiddler to become the new CurrentTiddler |
|
||||
|class |CSS classes to added to the generated elements |
|
||||
|
||||
! CSS Class Variables
|
||||
|
||||
The tiddler widget assigns several useful CSS classes to variables that it creates:
|
||||
|
||||
* ''missingTiddlerClass'': ''"tw-tiddler-exists"'' or ''"tw-tiddler-missing"'' depending upon whether the target tiddler exists
|
||||
* ''shadowTiddlerClass'': ''"tw-tiddler-shadow"'' if the tiddler is a shadow tiddler
|
||||
* ''systemTiddlerClass'': ''"tw-tiddler-system"'' if the tiddler is a system tiddler
|
||||
* ''tiddlerTagClasses'': A space separated list of CSS classes named ''"tw-tagged-{tagname}"''. For example ''"tw-tagged-introduction"''. Note that tag names are UrlEncoded which means that the tag ''$:/tags/Macro'' appears as the CSS class ''"tw-tagged-%24%3A%2Ftags%2FMacro"''
|
||||
|
||||
You can use these variables like this:
|
||||
|
||||
```
|
||||
<$tiddler tiddler="MyOtherTiddler">
|
||||
<div class=<<missingTiddlerClass>>>
|
||||
<$transclude/>
|
||||
</$tiddler>
|
||||
```
|
||||
|
||||
See also [[$:/core/ui/ViewTemplate]].
|
||||
|
Loading…
Reference in New Issue
Block a user