Creating a new tiddler with tag "title" from a list

93 views
Skip to first unread message

JM

unread,
Feb 12, 2021, 12:03:01 PM2/12/21
to TiddlyWiki

Hi there,

I hope the title gives an idea of my problem:

I'm working on my own To-Do-TiddlyWiki and I have build a list where the tasks are listed by projects. That works out well. Now I want to have a button added behind the project-title that adds a tiddler tagged with the specific title:

<$list filter="[tag[project]sort[title]]">
<$link to={{!!title}}>__''<$view field="title"/>''__</$link> <$button>
<$action-sendmessage $message="tm-new-tiddler" title="New Task" tags=<currentTiddler> />New Task</$button><br>
<$list filter="[is[current]tagging[]sort[title]]">
<$checkbox tag="done"> <$link to={{!!title}}>''<$view field="title"/>''</$link></$checkbox><br>
</$list>
</$list>

This works out well, except for a project-title consisting of multiple words, because two words will be treated as two different tags.

Can anyone give me a hint?

Thx
Jens

JM

unread,
Feb 12, 2021, 12:24:40 PM2/12/21
to TiddlyWiki
Sorry, of course tags=<<currentTiddler>>

Mark S.

unread,
Feb 12, 2021, 12:35:56 PM2/12/21
to TiddlyWiki
You need to wrap the tiddler name with double braces, since the tags field is a list field.  Since [[ and ]] have special meaning in filters, they have to be added sidewise, using variables. In my example below, you'll need to revert HelloThere back to your original tag:

<$vars lb="[[" rb="]]">
<$list filter="[tag[HelloThere]sort[title]]">
<$link to={{!!title}}>__''<$view field="title"/>''__</$link> <$button>
<$action-sendmessage $message="tm-new-tiddler" title="New Task" 
tags={{{ [<currentTiddler>addprefix<lb>addsuffix<rb>] }}} 
/>New Task</$button><br>
<$list filter="[is[current]tagging[]sort[title]]">
<$checkbox tag="done"> <$link to={{!!title}}>''<$view field="title"/>''</$link></$checkbox><br>
</$list>
</$list>
</$vars>

JM

unread,
Feb 12, 2021, 12:45:34 PM2/12/21
to TiddlyWiki
No, unfortunately that makes no difference.
 tags={{{ [<currentTiddler>] }}}
will also split a title consisting of multiple words into multiple tags.

JM

unread,
Feb 12, 2021, 12:47:21 PM2/12/21
to TiddlyWiki
Sorry, now I realized it, I'll give it a second try!

JM

unread,
Feb 12, 2021, 1:46:38 PM2/12/21
to TiddlyWiki
This works out well! Thank you!

JM

unread,
Feb 17, 2021, 10:25:51 AM2/17/21
to TiddlyWiki
As I need this button quite often - is it possible to store the code of the button in a tiddler and use it as a reference?
Reply all
Reply to author
Forward
0 new messages