My entry template looks for the category of the entry
{% for category in entry.productCategory %}
{{ category.uri }}
{% endfor %}
This will output products/[category slug]
as I intended. There is only one value in the loop.
As soon as I wrap the category URI in HTML like this:
{% for category in entry.productCategory %}
<a href="{{ category.uri }}">view</a>
{% endfor %}
The URI doubles: eg the output is repeated so the template renders {{ category.uri }}
as
products/[category slug]/products/[category slug]
Am I missing something in the loop / or Twig behaviour?