Customizing the default tiddlers with filters

If you go in the control panel, there is a section called “Default tiddlers”. There, you can write the name of the tiddlers that will be displayed whenever you restart your wiki or when you use the “home” button.

You can also use filters, as illustrated with the button “retain story ordering” :

This way, when restarted the tiddlers that were open the last time will still be in the story. Neat, isn’t it ? There is a lot of possibility here, and I wanted to use this post to see what others are doing with this. Here are some I find useful :

Quickly pin tiddlers to the story

Create a button that toggle the tag “pinned” to a tiddler, then use this filter :

[tag[pinned]]

Display tiddlers on certain days only

[<now DDD>match[Saturday]tagging[]]

Will display tiddlers tagged Saturday on Saturday. See my other post for more examples.

Display a tiddler if your wiki is local

[tag[local]]:filter[{$:/info/url/protocol}match[file:]]

or

[{$:/info/url/protocol}match[file:]then[local]tagging[]]

Will list tiddlers tagged with local if your wiki is local. This is useful if you share your wiki on github page for example.

Display a pseudo random tiddler in the story

[tag[WritingPrompts]]:filter[<length>multiply<now XXX>divide[999]compare:integer<index>]

Will pick a pseudo random (time based, up to 999) tiddler tagged with WritingPrompts. Useful for writing or to give random tips to visitor (thanks to @linonetwo for this idea !)

This filter will override previous filters so you need to use it in first position. If anyone know a better way to do that please feel free to edit this post!


So, do you use filters for your default tiddlers ?
Share your own !

6 Likes

Really good overview of this useful feature.

I do want to mention (for javascript devs, and as a reminder to self) that this behaviour can even be customized further in javascript. See: https://tiddlywiki.com/dev/static/Hook%3A%20th-opening-default-tiddlers-list.html

For example, a “startup” javascript tiddler could set a function to respond to that hook, allowing a customization (or adding to) the user’s wikitext defined Default Tiddlers.

2 Likes

Interecting, I didn’t realize this can be dynamic…

Maybe it makes me possible to open the daily journey automatically everyday. Or maybe open a “tips of the day” tiddler when go back to tm-home…

@joshuafontany thanks, I didnt knew about that :smiley: Sounds useful for ui related stuff !
@linonetwo I like your “tips of the day” idea a lot, I think I will use that in my writing related tiddlywiki to display a random writing prompt at startup.

EDIT : I’ve updated the list of filters to show how to display a (pseudo) random tiddler in the story ! I think it could be improved upon so please let me know if you come up with a better solution :slight_smile:

Hi,

I cant find the default tiddlers option in node.js version. Is this available?

Yes, the node js version use the same UI than the single file version.

Click on the “Open control panel” button in the sidebar (right of the screen)

image

The default tiddlers configuration is located in the first tab:

1 Like

Thank you. I kept looking for it in the settings tab.

1 Like