title: $:/plugins/tiddlywiki/tour/globals tags: $:/tags/Global \whitespace trim \function tour-current-tag() [{$:/config/CurrentTour}get[tour-tag]] \end \function tour-is-not-first-step() [all[shadows+tiddlers]tagbefore{$:/state/tour/step}count[]compare:number:gt[0]] \end \function tour-is-last-step() [all[shadows+tiddlers]tagafter{$:/state/tour/step}count[]compare:number:eq[0]] \end \function tour-is-not-last-step() [all[shadows+tiddlers]tagafter{$:/state/tour/step}count[]compare:number:gt[0]] \end \procedure tour-initialise-current-tour-step() \procedure tv-action-refresh-policy() always <$transclude $tiddler={{$:/state/tour/step}} $field="enter-actions"/> \end \procedure tour-chooser(filter:"[all[shadows+tiddlers]tag[$:/tags/Tour]]") \define choose-tour-actions() <$transclude $variable="tour-start" title=<>/> \end choose-tour-actions
<$list filter=<>>
<$transclude $field="description"> <$text text=<>/>
<$button class="tc-btn-invisible tc-tour-panel-chooser-start-button" actions=<>> start {{$:/core/images/chevron-right}}
\end tour-chooser \procedure tour-start(title,step) \procedure tv-action-refresh-policy() always <$action-setfield $tiddler="$:/config/CurrentTour" text=<>/> <$transclude $variable="tour-restart" step=<<step>>/> \end \procedure tour-restart(step) \procedure tv-action-refresh-policy() always <$action-setfield $tiddler="$:/config/ShowTour" text="show"/> <$action-setfield $tiddler="$:/state/tour/step" $field="text" $value={{{ [<step>!is[blank]] :else[all[shadows+tiddlers]tag<tour-current-tag>first[]] }}}/> <<tour-initialise-current-tour-step>> \end \procedure tour-next-step() \procedure tv-action-refresh-policy() always <$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/steps/finished]] }}}/> <<tour-initialise-current-tour-step>> \end \procedure tour-previous-step() \procedure tv-action-refresh-policy() always <$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[]] }}}/> <<tour-initialise-current-tour-step>> \end \procedure tour-display-current-tour() <$transclude $tiddler={{$:/config/CurrentTour}} $field="description"> <$text text={{$:/config/CurrentTour}}/> </$transclude> \end