How can display a Tag name with is link base on Tag ID
SOLVE
I create a module with on repeatable field base on Tag Selector field. It retrun me a array with tags ID. I need to display the tag name with tag link base on this ID, how can i do? tag.filter_tag_name --> return a id like 5751176252
I need the name and the slug
{% for tag in module.tags_group %}
<div class="filter-wrapper2">
<label class="abc-filter">
<input type="checkbox" id="input-{{ tag.filter_tag_name.slug }}" >
<span class="label-text">{{ tag.filter_tag_name }}</span>
</label>
{% endfor %}
{% set all_tags = blog_tags('default', 250) %} {% for tag in module.tag_field %} {% for item in all_tags %} {% if item.slug == tag %} Name = {{ item }} Slug = {{ tag }} Full URL = {{ blog_tag_url(group.id, tag) }} {% endif %} {% endfor %} {% endfor %}
But you have to set the value type to return to "Name" instead of "id" in the tag field
So for you:
{% set all_tags = blog_tags('default', 250) %} {% for tag in module.tag_field %} {% for item in all_tags %} {% if item.slug == tag %} <div class="filter-wrapper2"> <label class="abc-filter"> <input type="checkbox" id="input-{{ tag }}" > <span class="label-text">{{ item }}</span> </label> </div> {% endif %} {% endfor %} {% endfor %}
{% set all_tags = blog_tags('default', 250) %} {% for tag in module.tag_field %} {% for item in all_tags %} {% if item.slug == tag %} Name = {{ item }} Slug = {{ tag }} Full URL = {{ blog_tag_url(group.id, tag) }} {% endif %} {% endfor %} {% endfor %}
But you have to set the value type to return to "Name" instead of "id" in the tag field
So for you:
{% set all_tags = blog_tags('default', 250) %} {% for tag in module.tag_field %} {% for item in all_tags %} {% if item.slug == tag %} <div class="filter-wrapper2"> <label class="abc-filter"> <input type="checkbox" id="input-{{ tag }}" > <span class="label-text">{{ item }}</span> </label> </div> {% endif %} {% endfor %} {% endfor %}