I wanted to create a tiddler and navigate to its draft. I did figure out how to do it but there were some traps along the way that I think should be avoided in the future:
The doc for ActionCreateTiddlerWidget informs that we, inside $action-createtiddler
, can access the variables
createTiddler-title
createTiddler-draftTitle
The doc gives an example for what to put inside a button so it creates a new tid and navigates to it:
<$action-createtiddler $basetitle="foo" $template="HelloThere">
<$action-navigate $to=<<createTiddler-title>>/>
</$action-createtiddler>
Fair enough.
Before you read on, I want to you tell yourself what you would change if you instead want to navigate to the tiddlers draft.
NO, donât read more. Look at the above an answer it to yourself.
My guess is that a majority here simply exchanged createTiddler-title
for createTiddler-draftTitle
. But that navigates to the veiwmode tiddler titled Draft of 'foo'
which obviously doesnât exist!
Instead something very different is required (and this is not in that doc tiddler):
<$action-createtiddler $basetitle="foo" $template="HelloThere">
<$action-sendmessage $message="tm-edit-tiddler" $param=<<createTiddler-title>>/>
</$action-createtiddler>
This is confusing, so Iâm considering requesting a modification to the ActionNavigateWidget like this:
<$action-navigate $to=<<createTiddler-title>> $mode=edit />
(or perhaps =draft
)
Is this reasonable? I would say it is a very common use case. (BTW, there is also a $scroll
property in $action-navigate
⌠even if I donât understand what navigation without scrolling even means.)
Thoughts?