link_ to_ type
string | link_to_type
returns string
Generates an HTML <a> tag with an href attribute linking to a collection page that lists all products of the given
product type.
{{ 'Health' | link_to_type }}
Code
{{ 'Health' | link_to_type }}Output
<a href="/collections/types?q=Health" title="Health">Health</a>
Output
<a href="/collections/types?q=Health" title="Health">Health</a>Anchor to HTML attributes
HTML attributes
string | link_to_type: attribute: string
You can specify HTML attributes by including a parameter that matches the attribute name, and the desired value.
{{ 'Health' | link_to_type: class: 'link-class' }}
Code
{{ 'Health' | link_to_type: class: 'link-class' }}Output
<a class="link-class" href="/collections/types?q=Health" title="Health">Health</a>
Output
<a class="link-class" href="/collections/types?q=Health" title="Health">Health</a>Was this page helpful?