Only make some text appear on card if there is something in a field

Hi

I have made a list of character frequencies for my deck.
I want to show these frequencies on the card.
The field contains both single characters (我)and longer word strings (我们).
When I have a frequency value for a character I want to display text (for example “character frequency”) when there is not frequency I don’t want this text to display.

For example:

{{word}}
Character frequency
{{frequency}}

Results:
1)
我 Character frequency 143185

我们

What do I need to hide the “character frequency” for result 2?

Thanks in advance.

You can use conditional tags:

{{word}}
{{#frequency}}
Characteur frequency {{frequency}}
{{/frequency}}

What is between the {{#frequency}} ... {{/frequency}} will only appear if that field is non-empty.

5 Likes