ifequal Tag

Logic

Argument(s): values to compare.

Documentation

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

Old Syntax (No Longer Works)

{% ifequal user.username "admin" %}
  Welcome, admin!
{% endifequal %}

New Syntax

{% if user.username == "admin" %}
  Welcome, 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 ifequal 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