I am trying to filter blog posts in a listing template and have
{% if "my tag" in content.topic_list|pprint %}
// HTML Markup
{% endif %}
Which shows posts when they are tagged with "my tag". How do I negate this to show posts that do NOT contain "my tag". I've tried inserting "not" everywhere in the statement with no success.
{% not if "my tag" in content.topic_list|pprint %}
{% if not "my tag" in content.topic_list|pprint %}
{% if "my tag" not in content.topic_list|pprint %}
{% if "my tag" in not content.topic_list|pprint %}
{% if "my tag" isnot in content.topic_list|pprint %}
All don't work.
Also side note... why do I have to pprint to be able to use the "in" operator... It doesn't work if I just call it on content.topic_list. Seems like a bug to me.
{% if not ("my tag" in content.topic_list)|pprint %}
// HTML Markup
{% endif %}
Couldn't find any examples of the logical 'not' operator documented for use with the 'in' operator. Maybe some of the other guys know @tjoyce, @Stephanie-OG
Hope that helps a little.
Note: Please search for recent posts as HubSpot evolves to be the #1 CRM platform of choice world-wide.
{% if not ("my tag" in content.topic_list)|pprint %}
// HTML Markup
{% endif %}
Couldn't find any examples of the logical 'not' operator documented for use with the 'in' operator. Maybe some of the other guys know @tjoyce, @Stephanie-OG
Hope that helps a little.
Note: Please search for recent posts as HubSpot evolves to be the #1 CRM platform of choice world-wide.