On Friday, November 27, 2020 at 11:27:24 AM UTC-8 [email protected]
wrote:
> in my template I have something like:
> Name: {{!!char_name}}, alias: {{!!alias}}
> on my actual Charakter tiddler I only have the field char_name, but not
> alias, so it renders to
> Name: John Doe, alias:
> and I would like to find a way to hide the ",alias: " part completely in
> that case.
>
Try this:
{{!!char_name}}<$list filter="[<currentTiddler>has[alias]]">, alias:
{{!!alias}}</$list>
Notes:
* the has[alias] operator only returns the currentTiddler if the alias
field is non-blank
* if you wanted to allow a blank alias field (but still require the field
to exist), use has:field[alias] instead
enjoy,
-e
--
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/04d453cb-c9a4-41ad-b765-17a5838d2558n%40googlegroups.com.