2

Per documentation I am getting a selected tag:

{% set tag = entry.myTagsField.first() %}

How to check if its name is equal to "Flower"?

4

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 %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.