Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#6274 closed (wontfix)

document that extends tag must be first in template

Reported by: trevor 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:


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 8 years ago.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by trevor

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

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from extends tag must be first in template to document that extends tag must be first in template
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 8 years ago by mtredinnick

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

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 8 years ago by mtredinnick

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

comment:4 Changed 8 years ago by mtredinnick

(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