[TW5]Dynamic values in Default Tiddler settings

79 views
Skip to first unread message

Joshua Stubbs

unread,
Aug 29, 2017, 9:29:45 AM8/29/17
to TiddlyWiki
I would like to set TiddlyWiki to always open my current journal entry by default, so in settings under Default Tiddlers, I added this:

[{ThisMonth}]

with ThisMonth being a tiddler containing:

<<now format: 'YYYY/0MM'>>

But this makes the default list contain a tiddler litterally named the contents of ThisMonth (e.g. 2017/08). What am I doing wrong?

Many thanks. Joshua.

TonyM

unread,
Aug 29, 2017, 6:22:32 PM8/29/17
to TiddlyWiki
Joshua,

While you await an answer, I just thought I would point out that once you achieve what you ask, if the current journal entry does not exist, you will have a new tiddler open with no content. That would be OK except we often want such new journal entries to have particular tags etc...

What I have done instead is to make a New Journal button visible in every tiddler, or in the sidebar or somewhere else on the page. Pressing this button opens the New Journal tiddler creating and adding tags as desired but if today's already exists opens today's Journal tiddler. 

This suggestion does not quite answer your question, but may be a better approach.

Regards
Tony

Joshua Stubbs

unread,
Aug 31, 2017, 3:43:20 AM8/31/17
to TiddlyWiki
Hi, Tony.

That seems like a viable option. However, I have no idea how to go about doing that. Do you perhaps have some snippets for me to get me started?

Thanks. Joshua.

TonyM

unread,
Aug 31, 2017, 4:27:15 AM8/31/17
to TiddlyWiki
Joshua,

I have the following in a tiddler, tagged $:/tags/ViewTemplate so it shows in all tiddlers. You may however transclude it in another tiddler.

\define set-tags() [[Journal]] [[$(currentTiddler)$]]
\define actions()
<$action-sendmessage
$message="tm-new-tiddler"
title=<<title>>
tags=<<set-tags>> />
\end


<$vars date=<<now "0MM-0DD">> title="$(date)$,Journal">
<$set name="tags" value=Journal>
<$button actions=<<actions>>>
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/new-journal-button}}
</$list>
Journal Entry
</$button>
</$set>
</$vars>

Regards
Tony

Reply all
Reply to author
Forward
0 new messages