How to get the link for "link_to_remove_tag"?

Highlighted
Excursionist
15 0 4

Is there a way to get the URL of the "link_to_remove_tag" instead of the entire <a> element?

 

So, when I use: 

 {{ tag | link_to_remove_tag: tag }}

It returns:

<a href="THE URL" title="Remove tag">Tag name</a>

 

How to get "THE URL" only? I would like to create my own <a> element.

Thank you in advance.

2 Likes
Highlighted
Excursionist
15 0 4

Anyone?

0 Likes
Highlighted
Excursionist
15 0 4

No? At least a hint from power users? If you know that it is not possible, please let me know so I would not check back for the answer. Such a live community...

1 Like
Highlighted
New Member
1 0 0

Here's an option:

{% capture tag_link %}{{ tag | link_to_add_tag: 'sale' }}{% endcapture %}
{% assign tag_link_parts = tag_link | remove_first: '<a href="' | split: '" title="' %}
{% assign tag_link = tag_link_parts[0] | strip %}
0 Likes