This page is part of a static HTML representation of the TiddlyWiki at https://tiddlywiki.com/

WidgetMessage: tm-fold-tiddler

 28th October 2019 at 11:35am

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 "show" or "hide", according to the fold state.

NameDescription
paramignored ... foldedState must be used
foldedStateState 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