On Monday, May 11, 2020 at 5:51:14 PM UTC-7, yrosgi L wrote:
>
> I have tried to add the source field to the view template with following
> text:
>
>> source: {{!!source}}
>>
> when the source field is empty, it just display "source:" at the bottom.
> I hope that the snippet above only display while source field is no empty.
>
There are several ways to test to see if there is a source field. Here's
one:
<$list filter="[<currentTiddler>has[source]]">
source: {{!!source}}
</$list>
The has[...] filter checks to see if the specified field is *non-empty*.
If the field does not exist or is empty, the body of the $list widget is
completely skipped. Thus, the "source:" label is only displayed when there
is an actual value to show.
enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)
InsideTiddlyWiki - http://TiddlyTools.com/InsideTW
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/202dfaa5-dcb4-4577-8889-9e3e4fe7dd6e%40googlegroups.com.