Is it possible to have a functionnal breadcrumbs with venture and a shorter url?

Derek09
Excursionist
16 0 4

Hello, I would like to know if I can have a functional breadcrumbs with a shorter link on the Venture theme?
For example, have https ://domain.com/products/tee instead of
https://domain.com/collections/t-shirts/products/tee.
And that my breadcrumbs does not display Home/Tee but Home/Collections/Tee.

 

here is my code for shorter link in product.card

<a href="{{ product.url | within: collection }}" class="product-card">

to

<a href="{{ product.url }}" class="product-card">

That would be much better instead of having too many links.
Here is my breadcrumbs code:

 

{% unless template == 'index' or template == 'cart' or template == 'list-collections' %}
<nav class="breadcrumb" role="navigation" aria-label="breadcrumbs">
<a href="/" title="Home">Home</a>
{% if template contains 'page' %}
<span aria-hidden="true">&rsaquo;</span>
<span>{{ page.title }}</span>
{% elsif template contains 'product' %}
{% if collection.url %}
<span aria-hidden="true">&rsaquo;</span>
{{ collection.title | link_to: collection.url }}
{% endif %}
<span aria-hidden="true">&rsaquo;</span>
<span>{{ product.title }}</span>
{% elsif template contains 'collection' and collection.handle %}
<span aria-hidden="true">&rsaquo;</span>
{% if current_tags %}
{% capture url %}/collections/{{ collection.handle }}{% endcapture %}
{{ collection.title | link_to: url }}
<span aria-hidden="true">&rsaquo;</span>
<span>{{ current_tags | join: " + " }}</span>
{% else %}
<span>{{ collection.title }}</span>
{% endif %}
{% elsif template == 'blog' %}
<span aria-hidden="true">&rsaquo;</span>
{% if current_tags %}
{{ blog.title | link_to: blog.url }}
<span aria-hidden="true">&rsaquo;</span>
<span>{{ current_tags | join: " + " }}</span>
{% else %}
<span>{{ blog.title }}</span>
{% endif %}
{% elsif template == 'article' %}
<span aria-hidden="true">&rsaquo;</span>
{{ blog.title | link_to: blog.url }}
<span aria-hidden="true">&rsaquo;</span>
<span>{{ article.title }}</span>
{% else %}
<span aria-hidden="true">&rsaquo;</span>
<span>{{ page_title }}</span>
{% endif %}
</nav>
{% endunless %}

Replies 2 (2)
Derek09
Excursionist
16 0 4

Up!! 

Thank you!

randi
Tourist
4 0 1

Did you figure out how to fix breadcrumbs after changing the code for the url?