{% url 'components_files' as url %}
{% if object and content_type_id %}
{% include "snippets/filter_snippet.html" with target=target url=url|add:"?content_type_id="|add:content_type_id|add:"&object_id"|add:object.pk %}
{% elif content_type_id %}
{% include "snippets/filter_snippet.html" with target=target url=url|add:"?content_type_id="|add:content_type_id %}
{% elif object %}
{% include "snippets/filter_snippet.html" with target=target url=url|add:"?object_id="|add:object.pk %}
{% else %}
{% include "snippets/filter_snippet.html" with target=target url=url %}
{% endif %}