Open new-or-existing Tiddler, in View mode if new?

80 views
Skip to first unread message

David Szego

unread,
Feb 12, 2017, 9:17:16 PM2/12/17
to TiddlyWikiDev
Hi all,

I'm looking for a message or widget that will act like:

<$action-sendmessage $message='tm-new-tiddler' title="abc" field1="x" field2="y" />

but will open an existing Tiddler if the same title exists, merely setting the fields. Moreover, I'd like to open it in view mode, not edit.

Alternately, even if I overwrite an existing Tiddler, I could make do, but again opening it in View mode would be ideal.

Any thoughts? Is this best achieved by cloning some existing code and re-writing to suit?

Thanks,
David.

PMario

unread,
Feb 13, 2017, 3:12:41 AM2/13/17
to TiddlyWikiDev

David Szego

unread,
Feb 13, 2017, 6:31:08 PM2/13/17
to TiddlyWikiDev
Thanks, PMario. I'm missing something... If I use a message to create or navigate to a tiddler that doesn't exist, it opens a new tiddler called "New Tiddler...".

How do I change that behaviour to open it in view mode, as if I was done editing and had clicked the checkmark button?

Thanks,
David.

PMario

unread,
Feb 13, 2017, 7:37:11 PM2/13/17
to TiddlyWikiDev
Hi David,


On Tuesday, February 14, 2017 at 12:31:08 AM UTC+1, David Szego wrote:
Thanks, PMario. I'm missing something... If I use a message to create or navigate to a tiddler that doesn't exist, it opens a new tiddler called "New Tiddler...".

use action-setfield and action-navigate  http://tiddlywiki.com/#ActionSetFieldWidget  see the examples here.

eg:

<$button>
<$action-setfield $tiddler="asdf" tags="NewTag [[Another New Tag]]" color="red"/>
<$action-navigate $to="asdf"/>
create / modify and open ~asdf
</$button>



send-message isn't flexible enough.

-m

PMario

unread,
Feb 13, 2017, 7:41:23 PM2/13/17
to tiddly...@googlegroups.com
<$action-setfield $tiddler="asdf" tags="NewTag [[Another New Tag]]" color="red"/>

color = "#df0000"

should work

Matabele

unread,
Feb 14, 2017, 2:12:33 AM2/14/17
to TiddlyWikiDev
Hi

Have a look at the ActionMaketid plugin from here.

regards

Tobias Beer

unread,
Dec 10, 2017, 4:00:21 AM12/10/17
to TiddlyWikiDev
@David,

Interesting. What would you be doing this for?

-tb
Reply all
Reply to author
Forward
0 new messages