Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#6274 closed (wontfix)

document that extends tag must be first in template

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

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

Download all attachments as: .zip

Change History (5)

by Trevor Caira, 17 years ago

comment:1 by Simon Greenhill <dev@…>, 17 years ago

Has patch: set
Summary: extends tag must be first in templatedocument that extends tag must be first in template
Triage Stage: UnreviewedReady for checkin

comment:2 by Malcolm Tredinnick, 17 years ago

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 by Malcolm Tredinnick, 17 years ago

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

comment:4 by Malcolm Tredinnick, 17 years ago

(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