Excluding articles from a blog listing

Hi

I’m creating a blog listing that places articles in different places on the page on the basis of certain tags, e.g. “Featured” and “Pinned”:

{% for content in contents %}
 {% if 'Pinned' in content.topic_list|map('name') %}

 My pinned article

 {% endif %}
{% endfor %}

{% for content in contents %}
 {% if 'featured' in content.topic_list|map('name') %}

 My featured article

 {% endif %}
{% endfor %}

{% for content in contents %}
 {% if ['Pinned' , 'Featured'] not in content.topic_list|map('name') %}	

All the other articles

 {% endif %}
{% endfor %}

For the last “all other articles” section this works fine if there is one tag defined tag:

{% if 'Featured' not in content.topic_list|map('name') %}

But not if there are two:

{% if ['Pinned' , 'Featured'] not in content.topic_list|map('name') %}

Is my code wrong here?

Thanks for any help here!

Hey, @DM2 :waving_hand: Thanks for the great question! I’d like to invite some of our HubL elves to the conversation — @BarryGrennan @miljkovicmisa @Brownstephen101, do you have any HubL-themed gifts for @DM2?

Best,

Jaycee

OK so as a workaround this works; but I’m not sure it’s an entirely elegant solution? If anyone has a more concise approach I would be interested:

{% for content in contents %}	
 {% if 'Featured' not in content.topic_list|map('name') %}		
 {% if 'Pinned' not in content.topic_list|map('name') %}

All the other articles...			

 {% endif %}		
 {% endif %}
{% endfor %}