link_ to_ tag
string | link_to_tag
returns string
Generates an HTML <a> tag with an href attribute linking to the current blog or collection, filtered to show
only articles or products that have a given tag.
Tip
To learn more about filtering by tag, refer to Filter articles by tag or Filter collections by tag.
Tip:
To learn more about filtering by tag, refer to Filter articles by tag or Filter collections by tag.
Tip: To learn more about filtering by tag, refer to <a href="/themes/architecture/templates/blog#filter-articles-by-tag">Filter articles by tag</a> or <a href="/themes/navigation-search/filtering/tag-filtering">Filter collections by tag</a>.
{% for tag in collection.all_tags %}
{{- tag | link_to_tag: tag }}
{% endfor %}
Code
{% for tag in collection.all_tags %}
{{- tag | link_to_tag: tag }}
{% endfor %}Data
{
"collection": {
"all_tags": [
"extra-potent",
"fresh",
"healing",
"ingredients"
]
},
"template": "collection"
}Output
<a href="/services/liquid_rendering/extra-potent" title="Show products matching tag extra-potent">extra-potent</a>
<a href="/services/liquid_rendering/fresh" title="Show products matching tag fresh">fresh</a>
<a href="/services/liquid_rendering/healing" title="Show products matching tag healing">healing</a>
<a href="/services/liquid_rendering/ingredients" title="Show products matching tag ingredients">ingredients</a>
Output
<a href="/services/liquid_rendering/extra-potent" title="Show products matching tag extra-potent">extra-potent</a>
<a href="/services/liquid_rendering/fresh" title="Show products matching tag fresh">fresh</a>
<a href="/services/liquid_rendering/healing" title="Show products matching tag healing">healing</a>
<a href="/services/liquid_rendering/ingredients" title="Show products matching tag ingredients">ingredients</a>Was this page helpful?