Let's say I have a tag group with handle genre.
I can make an entry contain information about this tag by creating a field of type tag that uses this group.
So I would have a field with handle genreTag added to the entry with handle movies.
(Note: I don't see the point of having to create an intermediary field, instead of just adding the tag selector to the entry. Why would I have multiple fields for the same tag group?)
Now I need to query entries that have a genre of adventure, for example.
I read this question, this question, the docs, and still don't get it:
As far as I understand, it would be done as follows:
{% set tag = craft.tags.genre('adventure').one() %}
{% if tag %}
{% set entries = craft.entries.relatedTo(tag) %}
{% endif %}
{% dd entries %}
And doing it by the field handle instead of the tag handle:
{% set tag = craft.tags.genreTag('adventure').one() %}
{% if tag %}
{% set entries = craft.entries.relatedTo(tag) %}
{% endif %}
{% dd entries %}
How should I approach this?
Thanks!