$reveal widget matching the value of a variable

73 views
Skip to first unread message

Luis Gonzalez

unread,
Oct 23, 2019, 10:28:45 AM10/23/19
to TiddlyWiki
The reveal widget is used in conjuntion with a state tiddler, state field or state property but I cant find the option of revealing a portion of text depending the value of a variable.

for example, I have a variable with the tasks done without closing date:

<$set name="cuantity" filter="[tag[done]close_date[]count[]]">

I want to show some buttons if this cuantity is not zero. Something like:

<$set name="cuantity" filter="[tag[done]close_date[]count[]]">
<$reveal type="nomatch" text="0" state=<<cuantity>> >

THE BUTTONS

</$reveal>
</$set>

I can't find a solution

Eric Shulman

unread,
Oct 23, 2019, 10:33:35 AM10/23/19
to TiddlyWiki
If you omit the "state" param, you can use the "default" param instead, which allows you to use a variable... like this:

<$reveal type="nomatch" text="0" default=<<cuantity>> >

enjoy,
-e


 

A Gloom

unread,
Oct 24, 2019, 4:35:19 AM10/24/19
to TiddlyWiki
nice! steals tip << >>

Luis Gonzalez

unread,
Oct 24, 2019, 4:45:40 AM10/24/19
to TiddlyWiki
Wow! It works fine

I have read the help of the $ reveal widget thousands of times and I could not imagine it was this way!


Thanks!!
Reply all
Reply to author
Forward
0 new messages