ifnotequal Tag

Logic

Argument(s): values to compare.

Documentation

The ifnotequal tag compared two values and displayed the contents of the block if they were not equal.

Old Syntax (No Longer Works)

{% ifnotequal user.username "admin" %}
  You are not the admin.
{% endifnotequal %}

New Syntax

{% if user.username != "admin" %}
  You are not the admin.
{% endif %}

Commentary

This tag no longer exists. Use the if tag with the != operator instead.


Did we get something wrong? Is there a use case for the ifnotequal tag that we should add? Please let us know.

Send Feedback

Official Documentation
This page last updated on Dec. 3, 2025, 11:37 p.m. EST