I have one tag for each entry.
- Entry1
Tag1
- Entry2
Tag2
Now I want to show them in the title of each entry. But it doesn't work.
{% for entry in craft.entries.section('mainEntry').limit(4) %}
{% set tag = entry.mainEntryTag.first() %}
<h2>{{ tag }} {{ entry.title }}</h2>
{% endfor %}
This results in displaying only the globally first tag:
- Entry1
Tag1
- Entry2
Tag1
If I just write: {% set tag = entry.projektart %}
I get the error: Object of class Craft\ElementCriteriaModel could not be converted to string
How can I get to current entry tag?