Hey Scott,
Sure! The code to do this is:
<$navigator story="$:/StoryList" history="$:/HistoryList">
<$button class="tc-btn-invisible tc-tiddlylink">
{{$:/core/images/home-button}} Home
<$action-sendmessage $message="tm-close-all-tiddlers" />
<$action-navigate $to="PLACE_TITLE_OF_HOME_TIDDLER_HERE"/>
</$button>
</$navigator>
Explanation:
- The "tm-close-all-tiddlers" message
<https://tiddlywiki.com/#WidgetMessage%3A%20tm-close-all-tiddlers> handles
actually closing all tiddlers, by sending that message up to the navigator
widget <https://tiddlywiki.com/#NavigatorWidget>.
- Then the action navigate widet
<https://tiddlywiki.com/#ActionNavigateWidget>actually opens your "HOME"
tiddler.
- The class="tc-btn-invisible tc-tiddlylink" in the button just adds a
bit of styling.
A working example:
- Go to tiddlywiki.com, make a new tiddler and paste the following:
<$navigator story="$:/StoryList" history="$:/HistoryList">
<$button class="tc-btn-invisible tc-tiddlylink">
{{$:/core/images/home-button}} Home
<$action-sendmessage $message="tm-close-all-tiddlers" />
<$action-navigate $to="ButtonWidget"/>
</$button>
</$navigator>
Best,
Diego
On Monday, January 7, 2019 at 6:59:56 PM UTC-6, Scott Kingery wrote:
>
> I have a button to navigate back to my home tiddler
> <$button to=Home >{{$:/core/images/home-button}} Home</$button>
>
>
> Is it possible to build such a button that would open Home and close the
> rest?
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/ef031976-405f-4bcb-a147-da33966c9287%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.