Opened 16 years ago

Closed 16 years ago

#11242 closed (duplicate)

templates: block tag can be nested in if but not in ifequal

Reported by: piotr.findeisen@… Owned by: nobody
Component: Template system Version: dev
Severity: Keywords: template, block, if, ifequal
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

(Applies to revision 10865)

Sometimes when template B extends template A, it can't redefine block contents.

The following does not work ('bbb' is displayed or nothing, depending on a and b)

  • a.html
    {% ifequal a b %}
     {% block X %} zzz {% endblock %}
    {% endif %}
    
  • b.html
    {% extends "a.html" %}
    {% block X %} bbb {% endblock %}
    

While this does (ifequal replaced with if):

  • a.html
    {% if a %}
     {% block X %} zzz {% endblock %}
    {% endif %}
    
  • b.html
    {% extends "a.html" %}
    {% block X %} bbb {% endblock %}
    

Change History (2)

comment:1 by anonymous, 16 years ago

This applies also to 1.1 pre-alpha SVN-9536, so it's not a recent regression. I have not checked other versions.

comment:2 by dc, 16 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #10975

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