On Monday, October 31, 2016 at 3:45:29 PM UTC-7, Philippe Le Toquin wrote:
>
> What I would ideally like to do is that the text in red (to be discarded) 
> only appears if the return of the macro is YES.
> I would like to use the RevealWidget but can't make it works. Here is what 
> I tried
> * <$link to={{!!title}}><$view field="title"/> </$link> <$reveal 
> type="match" state="<$macrocall $name="day-left" 
> bestbefore={{!!bestbefore}} />" text="YES">@@color:red;( to be discarded 
> )@@ </$reveal>
> but the result of that is not working. Instead it displays:
>

While the "text" param can contain any desired text, macro call, or 
transclusion syntax, the "state" param can only be used to specify a 
TextReference (i.e., a target tiddler field or a DataTiddler property in 
which to store the current state value).

To use a macro value instead of a stored state value, *omit* the "state" 
param entirely and use the "default" param instead... something like this:

<$reveal type="match" default=<<day-left bestbefore={{!!bestbefore}}>> 
text="YES">>
   @@color:red;( to be discarded )@@
</$reveal>

That should do it.  Let me know how it goes.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
InsideTiddlyWiki: The Missing Manuals

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/6eca92e6-357b-4577-8118-33abb7bc99ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to