Hi all,
It’s a noob question but can’t seam to manage it. We have this code in one clients website:
{% for destinatie in destinatii %}
{% if (this.page.id == ‘ce-sa-vezi’ and destinatie.category == ‘1’ or destinatie.category == ‘2’ or destinatie.category == ‘3’ or destinatie.category == ‘4’ or destinatie.category == ‘5’ or destinatie.category == ‘6’ or destinatie.category == ‘7’ or destinatie.category == ‘8’) %}
{% partial ‘cards/destinatie’ %} Toate
{% elseif this.page.id == ‘ce-sa-vezi-rezervatii’ and destinatie.category == ‘1’ %}
{% partial ‘cards/destinatie’ %}
{% elseif this.page.id == ‘ce-sa-vezi-natura’ and destinatie.category == ‘2’ %}
{% partial ‘cards/destinatie’ %}
{% elseif this.page.id == ‘ce-sa-vezi-monumente’ and destinatie.category == ‘3’ %}
{% partial ‘cards/destinatie’ %} Monumete
{% elseif this.page.id == ‘ce-sa-vezi-edificii-religioase’ and destinatie.category == ‘4’ %}
{% partial ‘cards/destinatie’ %}
{% elseif this.page.id == ‘ce-sa-vezi-mestesuguri’ and destinatie.category == ‘5’ %}
{% partial ‘cards/destinatie’ %}
{% elseif this.page.id == ‘ce-sa-vezi-muzee’ and destinatie.category == ‘6’ %}
{% partial ‘cards/destinatie’ %}
{% elseif this.page.id == ‘ce-sa-vezi-patrimoniu-minier’ and destinatie.category == ‘7’ %}
{% partial ‘cards/destinatie’ %}
{% elseif this.page.id == ‘ce-sa-vezi-altele’ and destinatie.category == ‘8’ %}
{% partial ‘cards/destinatie’ %}
{% endif %}
{% endfor %}
The result shoul be that for the first query it should show all the entryes and for the elseif’s it should show only the page + specific one category. The problem is that for all the querys the result is ALL. If we delete the long “or” clauses, the single entryes with specific page are showing.
Thank you in advance.