mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-13 21:34:51 +00:00
25 lines
965 B
Plaintext
25 lines
965 B
Plaintext
caption: tm-fold-tiddler
|
|
created: 20160424232749223
|
|
modified: 20191028113537119
|
|
tags: Messages
|
|
title: WidgetMessage: tm-fold-tiddler
|
|
type: text/vnd.tiddlywiki
|
|
|
|
The `tm-fold-tiddler` message toggles the value of a state tiddler. It does so by setting the text of a state tiddler to either "<<.value "show">>" or "<<.value "hide">>", according to the fold state.
|
|
|
|
|!Name |!Description |
|
|
|param |ignored ... foldedState must be used |
|
|
|foldedState |State tiddler in which the fold state is stored |
|
|
|
|
<<.tip "The core uses a foldState prefix of `$:/state/folded/` + `tiddler title` to store the fold states for the default story view.">>
|
|
|
|
The `tm-fold-tiddler` message is usually generated with the ButtonWidget and is handled by the surrounding NavigatorWidget.
|
|
|
|
The core $:/core/ui/ViewTemplate defines a global variable `folded-state`, that is used with every tiddler. It's created like this:
|
|
|
|
```
|
|
\define folded-state()
|
|
$:/state/folded/$(currentTiddler)$
|
|
\end
|
|
```
|