Filter in the domain of the product collection page

Hi,

When I select the filter criteria in the collection page, new content is added to my domain, which results in a new page with exactly the same content.

Dingtalk_20210831115112.jpg

Now I want to determine all the collection pages after selecting the filter and add noindex, before I used “current_tags”, but now it doesn’t work.

{% if template contains ‘collection’ and current_tags %}

{% endif %}

How do I determine if the domain name of a collection page contains a filter?