2023-09-10 10:00:55 +00:00
|
|
|
title: $:/plugins/tiddlywiki/tour/globals
|
|
|
|
tags: $:/tags/Global
|
|
|
|
|
2023-09-10 14:23:05 +00:00
|
|
|
<!--
|
|
|
|
|
|
|
|
The following state tiddlers control the tour. They should not be directly modified,
|
|
|
|
but rather use the appropriate procedure to ensure that all the associated actions are performed.
|
|
|
|
|
2023-09-10 16:23:18 +00:00
|
|
|
$:/config/CurrentTour: title of current tour definition tiddler
|
|
|
|
$:/config/ShowTour: "show" (default) or "hide"
|
|
|
|
$:/state/tour/step: title of current step of the tour
|
2023-09-10 14:23:05 +00:00
|
|
|
|
|
|
|
Tour definition tiddlers have the following fields:
|
|
|
|
|
2023-09-10 16:23:18 +00:00
|
|
|
tags: must include $:/tags/Tour
|
|
|
|
tour-tag: name of tag used to define tour step sequence
|
|
|
|
logo: title of tiddler containing logo of tour
|
|
|
|
description: brief description of the tour
|
|
|
|
text: longer description of the tour
|
2023-09-10 14:23:05 +00:00
|
|
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
\function tour-current-tag()
|
|
|
|
[{$:/config/CurrentTour}get[tour-tag]]
|
|
|
|
\end
|
|
|
|
|
|
|
|
\function tour-is-not-first-step()
|
|
|
|
[all[shadows+tiddlers]tag[$:/tags/Tour/IntroductionToTiddlyWiki]before{$:/state/tour/step}count[]compare:number:gt[0]]
|
|
|
|
\end
|
|
|
|
|
2023-09-10 10:28:23 +00:00
|
|
|
\procedure tour-initialise-current-tour-step()
|
2023-09-10 10:34:34 +00:00
|
|
|
<$transclude $tiddler={{$:/state/tour/step}} $field="enter-actions"/>
|
2023-09-10 10:28:23 +00:00
|
|
|
\end
|
|
|
|
|
2023-09-10 10:00:55 +00:00
|
|
|
\procedure tour-restart()
|
|
|
|
<$action-setfield $tiddler="$:/config/ShowTour" text="show"/>
|
2023-09-10 14:23:05 +00:00
|
|
|
<$action-setfield $tiddler="$:/state/tour/step" $field="text" $value={{{ [all[shadows+tiddlers]tag<tour-current-tag>first[]] }}}/>
|
2023-09-10 10:28:23 +00:00
|
|
|
<<tour-initialise-current-tour-step>>
|
|
|
|
\end
|
|
|
|
|
|
|
|
\procedure tour-next-step()
|
2023-09-10 14:23:05 +00:00
|
|
|
<$action-setfield $tiddler="$:/state/tour/step" $field="text" $value={{{ [all[shadows+tiddlers]tag<tour-current-tag>after{$:/state/tour/step}else[$:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/finished]] }}}/>
|
2023-09-10 10:28:23 +00:00
|
|
|
<<tour-initialise-current-tour-step>>
|
2023-09-10 10:00:55 +00:00
|
|
|
\end
|
2023-09-10 10:28:23 +00:00
|
|
|
|
|
|
|
\procedure tour-previous-step()
|
2023-09-10 14:23:05 +00:00
|
|
|
<$action-setfield $tiddler="$:/state/tour/step" $field="text" $value={{{ [all[shadows+tiddlers]tag<tour-current-tag>before{$:/state/tour/step}] :else[all[shadows+tiddlers]tag<tour-current-tag>first[]] }}}/>
|
2023-09-10 10:28:23 +00:00
|
|
|
<<tour-initialise-current-tour-step>>
|
|
|
|
\end
|
|
|
|
|