Per documentation I am getting a selected tag:
{% set tag = entry.myTagsField.first() %}
How to check if its name is equal to "Flower"?
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It only takes a minute to sign up.
Sign up to join this communityPer documentation I am getting a selected tag:
{% set tag = entry.myTagsField.first() %}
How to check if its name is equal to "Flower"?
Your code returns an TagModel and saves it as "tag". You can now get all model properties like this:
{{ tag.property_name }}
In your case it would look like this:
{% if tag.name == 'Flower' %}
Do stuff
{% endif %}