Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#6274 closed (wontfix)

document that extends tag must be first in template

Reported by: Trevor Caira Owned by: nobody
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The documentation is wrong--the {% extends %} tag must be the very first thing in the template. Otherwise, strange behavior might occur. For example, if C extends B and B extends A, and A provides a block "title", if anything precedes the {% extends %} in B, then C's title block will not override the default in A unless B also provides an {% extends %}.

I've attached a documentation patch to clarify this.

Attachments (1)

clarify-extends-behavior.diff (721 bytes) - added by Trevor Caira 9 years ago.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by Trevor Caira

comment:1 Changed 9 years ago by Simon Greenhill <dev@…>

Has patch: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Summary: extends tag must be first in templatedocument that extends tag must be first in template
Triage Stage: UnreviewedReady for checkin

comment:2 Changed 9 years ago by Malcolm Tredinnick

Resolution: wontfix
Status: newclosed

I've decided to fix the root problem here, rather than documenting around it. In a moment, I'll commit a change that will allow text prior to the extends tag, so that whitespace won't interfere with things (the text will always be ignored, as per usual "extends" handling, but it allows for more formatting options).

So, thanks for the patch, but we can fix this a different way.

comment:3 Changed 9 years ago by Malcolm Tredinnick

(In [7082]) Allow whitespace prior to an "extends" tag. This allows a little more formatting flexibility. Refs #6274.

comment:4 Changed 9 years ago by Malcolm Tredinnick

(In [7084]) Fixed #5124 -- Added a reasonable error when "extends" is not the first template tag. Patch from k0001.

Refs #6274.

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