Stupid tiddler tricks: the DefaultTiddlers restore button

TiddlyWiki’s startup behavior is easily customizable. You open up $:/DefaultTiddlers and put in a list of what you want to have open, and those are the tiddlers you have open. To make it even easier, you can edit $:/DefaultTiddlers from a text box in GettingStarted, the tiddler that’s open by default in a fresh new wiki, or from another text box in $:/ControlPanel’s info/basics tab.

My current DefaultTiddlers is nine items, seven of which are themselves lists. (My “daily oldest” list is by far the longest; a couple of the other lists are limited to one tiddler, like the one that serves up the oldest unread book in my personal library.)

Sometimes you want to start up where you left off, though, and that’s almost as easy. There’s a “retain story ordering” button under that ControlPanel text box that sets DefaultTiddlers to [list[$:/StoryList]] – on startup, you’ll see whatever was open the last time you saved the wiki.

Switching back to my carefully crafted set of lists wasn’t nearly as easy.

My first crack at solving this was fairly simple – I had a “Default Tiddlers Backup” tiddler that I’d copy and paste into the text box. After doing that for a while, though, even that little bit of effort effort started to add up, so I started wondering whether there was a way to duplicate the button…

Some research led me to the shadow tiddler $:/language/ControlPanel/Basics/DefaultTiddlers/BottomHint, and I was able to add:

...or <$button set="$:/DefaultTiddlers" setTo={{Default Tiddlers Backup}}>restore the default</$button> (from [[here|Default Tiddlers Backup]])

(I may or may not clean up the resulting kludge of a sentence later. For now, I just want the buttons and link in the right place.)

So, right after that “retain story ordering” button, I have a “stop retaining story ordering and go back to my normal DefaultTiddlers” button, as well as a link to where I have that list stored (because I still edit it every once in a while).

Categories: PiecesTags:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: