For example Taxonomy Terms field Label is always displayed even if no tags added to it. How can I show Taxonomy Terms field's Label and its values (tag's links), only when there have been a value added to it?
I try to achieve that by adding conditionals based fields, something like below code to node template:
{% if content.field_tag is not empty %}
{{ content.field_tag }}
{% endif %}
or
{% if content.field_tag %}
{{ content.field_tag }}
{% endif %}
According to the article:Comparison of PHP Template and Twig theming paradigms but whatever I try I can't get any result.
Label
always be displayed.