Opened 6 years ago

Closed 19 months ago

#11259 closed Uncategorized (wontfix)

Support for elifequal when ifequal is used.

Reported by: rokj Owned by: nobody
Component: Template system Version:
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It would be nice that template syntax would support something like:

{% ifequal name "something1" %}
...
{% elifequal name "something2" %}
...
{% else %}
...
{% endifequal %}

This usage would be common in for loops:
{% for name in name %}
...
{% endfor %}

Regards,

Rok

Change History (6)

comment:1 in reply to: ↑ description Changed 6 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Replying to rokj:

It would be nice that template syntax would support something like:

{% ifequal name "something1" %}
...
{% elifequal name "something2" %}
...
{% else %}
...
{% endifequal %}

This usage would be common in for loops:
{% for name in name %}
...
{% endfor %}

Regards,

Rok

{% for name in names %} ... {% endfor %}

comment:2 Changed 6 years ago by Tarken

Possibly a duplicate or #8296. Or at least, a sub-issue of that one.

comment:3 Changed 6 years ago by SmileyChris

  • Resolution set to wontfix
  • Status changed from new to closed

If we don't have {% elif %}, we're definitely not getting {% elifequal %} in core.

If this was just a request to be able to support that syntax, then yes this is a dupe of #8296

comment:4 Changed 19 months ago by antiflu@…

  • Easy pickings unset
  • Resolution wontfix deleted
  • Severity set to Normal
  • Status changed from closed to new
  • Type set to Uncategorized
  • UI/UX unset

comment:5 Changed 19 months ago by anonymous

elif is here.. can we now get elifequal? :-)

comment:6 Changed 19 months ago by timo

  • Resolution set to wontfix
  • Status changed from new to closed

I don't think this is necessary now that the equality operator is supported, i.e. {% if a == b %} ... {% elif a == c %}

Note: See TracTickets for help on using tickets.
Back to Top