[TW5] Using results of list in tag checkboxes

162 views
Skip to first unread message

Matthew Petty

unread,
Sep 15, 2016, 8:45:52 AM9/15/16
to TiddlyWiki
This must have been answered somewhere, but I can't find it.

I want use the results of a list to create a set of checkboxes. I have GTD-style task contexts as tiddlers with the prefix "@". I want to have a set of checkboxes at the top of each task with these contexts available as the tags to be selected.

I have this:
<$list filter="[prefix[@]sort[title]]">
<$checkbox tag={{!!title}}> {{!!title}}</$checkbox>
</$list>

which returns:

[ ] @Work [ ] @Home

But when I click on the checkbox for @Work, the tiddler @Work is tagged with @Work. What I want to happen is that whatever tiddler this checkbox is in is tagged with @Work.

What syntax did I get wrong?

PMario

unread,
Sep 15, 2016, 11:17:15 AM9/15/16
to TiddlyWiki
Hi Matthew,

try this:

\define xxx()
<$list filter="[prefix[@]sort[title]]" variable="test">
<$checkbox tag=<<test>>> <<test>></$checkbox>
</$list>
\end

<<xxx>>



I did use a variable named test. You should adjust the name, so it fits your project better.

have fun!
mario

Matthew Petty

unread,
Sep 22, 2016, 3:13:41 AM9/22/16
to TiddlyWiki
Perfect, thank you!

PMario

unread,
Sep 22, 2016, 3:50:06 AM9/22/16
to TiddlyWiki
On Thursday, September 22, 2016 at 9:13:41 AM UTC+2, Matthew Petty wrote:
Perfect, thank you!

You are welcome!
-m
Reply all
Reply to author
Forward
0 new messages