I’m trying to migrate stuff to Tera v2 and noticed I cannot seem to get the invocation count using nth variable. I’ve looked at the docs and found nothing about it, and doesn’t seem it is exposed to component global variables, so is it completely removed or is there alternative that I can use?
I was relying on it to auto-anchor the tabs appear in the same group, since slugifying titles solely won’t ensure uniqueness across the same page.
{% <tabs> %}
{% <tab title="Foo Tab"> %} {#- "group1-foo-tab" -#}
Tab content
{% </tab> %}
{% <tab title="Bar Tab"> %} {#- "group1-bar-tab" -#}
Second tab content
{% </tab> %}
{% </tabs> %}
{% <tabs> %}
{% <tab title="Foo Tab"> %} {#- "group2-foo-tab" -#}
A tab belongs to another tab group even if the title slug is the same
{% </tab> %}
{% </tabs> %}
Getting system time for each invocation perhaps could act like an ID but still, it feels hacky and that would end up every file in every build being different for the same content anyway.