If you want to filter for the used terms of a collection, there are shown all terms.
See code
{{ taxonomy:tax-name collection="col-name" }}
{{ title }}
{{ /taxonomy:tax-name }}
Statamic version: 3.0.0.-beta-31
PHP version: 7.4
Install method (choose one):
statamic/statamicshouldn't you add min_count="1" ?
https://statamic.dev/tags/taxonomy
Are you saying terms from all collections are being shown in that loop?
Or that unused terms in that collection are being shown?
Hey, I meant, all the terms from the taxonomy list are shown. The unused terms are shown as well. The collection="col-name" has no effect of the result.
I get this too, I think I'm just not quite getting how to do this properly in v3. I have 2 collections, both using the same taxonomy called 'topics'. Topics has a lot of terms in it, so we don't want to display all possible terms in both collections.
In my collections folder, I have an index.antlers.html that I would like to show a list of all the topics that relate to that collection. I've tried all sorts of ways of trying to do this but I can't get it right.
My code currently looks like this, but it outputs all of the topics instead of only the ones that relate to the collection (i.e. topics that have been tagged onto an entry in the collection)
{{ taxonomy:topics :collection="portfolio" min_count="1" }}
<a class="rm-simple-link" href="{{url}}">{{title}}</a>
{{ /taxonomy:topics }}
Any idea where I'm going wrong?
Just adding that I've tried it like this too (and all sorts of other ways), which if I look at the docs would seem to be the right way to do it, but the collection option doesn't seem to do anything! Do you need to do something in the taxonomy to apply the tags to the collection, or is it enough to add a tag to an entry in the collection?
https://statamic.dev/tags/taxonomy#parameters
{{ taxonomy:topics collection="portfolio" }}
<a class="rm-simple-link" href="{{url}}">{{title}}</a>
{{ /taxonomy:topics }}
We're trying to get a list of filters, like below, but we only want the ones that apply to that specific collection and it's outputting all of them.

Confirmed. This appears to still be happening in the latest release. In my case I'm using a taxonomy called tags that's shared between 3 collections. All terms are showing and the collection parameter doesn't have any effect.
@jasonvarga Can you confirm if this is a bug or the intended design? The only way to show only tags with results is by wrapping them with {{ if entries }}...{{/if}}.
{{ taxonomy:tags collection="integrations" }}
{{ if entries }}
<a href="{{ url }}" class="badge-spaced badge badge-lg badge-secondary">{{ title }}</a>
{{ /if }}
{{ /taxonomy:tags }}
This issue has not had recent activity and has been marked as stale — by me, a robot. Simply reply to keep it open and send me away. If you do nothing, I will close it in a week. I have no feelings, so whatever you do is fine by me.
I can confirm this and it is easy to reproduce (and for the sake of stopping the evil bot from closing this issue):
tagand assign it to two news entries and to one team entry1, but it outputs 3{{ taxonomy:tags collection="team" }}
{{ entries_count }}
{{ /taxonomy:tags }}
For the same reason, the attribute min_count is also broken, because it counts the count from all collections, and not just from the filtered collection(s?).
This issue has not had recent activity and has been marked as stale — by me, a robot. Simply reply to keep it open and send me away. If you do nothing, I will close it in a week. I have no feelings, so whatever you do is fine by me.
Still an issue with 3.0.47.