Question about the checkbox widget

62 views
Skip to first unread message

Luis Gonzalez

unread,
Jul 26, 2019, 8:06:46 AM7/26/19
to tiddl...@googlegroups.com
 I have a list with checkboxes in a tiddler named "Note type 1":

<$list filter="[tag{!!title}]" >
<$checkbox tag="Note type 1" > <<currentTiddler>>
</$checkbox>
</$list>

It is a list of all notes of type  1.

When I add new note type  I have to copy the code and change the tag parameter to the name of the new note type.
In order to use templates I need that the tag parameter is variable.

The question: How can I put in the tag parameter the tittle of the tiddler instead a static string?
Something like <$checkbox tag=<<currentTiddler>> > or
<$checkbox tag={{!!title}} >


Mark S.

unread,
Jul 26, 2019, 11:44:54 AM7/26/19
to TiddlyWiki
Your suggestion with
tag={{!!title}}

should work fine. Though that doesn't seem too useful. You can use some other variable <<myvariable>> as well.

Something like this is probably more what you have in mind. Go to TiddlyWiki.com (I use this because it has
lots of tiddlers to play with). Make a coupe of your own tiddlers tagged with "MyTags". Then pasted
the following code at the top of the TableOfContents tiddler :

<$select tiddler="$:/temp/tagchoice" default='HelloThere'>
<$list filter='[tag[MyTags]sort[title]] HelloThere'>
<option value=<
<currentTiddler>>><$view field='title'/></option>
</$list>
</$select>

<$list filter="[tag{!!title}]" >
<$checkbox tag={{$:/temp/tagchoice}} > <
<currentTiddler>><br/>
</$checkbox>
</$list>

Now you can select what tag you want to apply. Then select the tiddlers where you want to apply it. Then go
down below to the original table of contents and click on the corresponding link to see the tiddler with the
selected tag applied.

I'm sure you can see how to adapt this for your needs.

Good luck!
Reply all
Reply to author
Forward
0 new messages