Closed Bug 318384 Opened 20 years ago Closed 20 years ago

move page-specific includes into the pages that include them

Categories

(www.mozilla.org :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: myk, Assigned: myk)

Details

(Whiteboard: [mozilla.com])

Attachments

(1 file)

lib/wrapper.tmpl contains a block of conditionally-processed page-specific includes. This is inefficient, because the template processor has to check the conditions for every page even though they each match only a single page. It's also bound to become unwieldy as the number of page-specific includes grows larger. Instead of putting these includes into lib/wrapper.tmpl, we should put them into the files to which they apply.
Assignee: mozilla.webmaster → myk
Status: NEW → ASSIGNED
Attachment #204586 - Flags: review?
Attachment #204586 - Flags: review? → review?(steven)
This is indeed ugly in it's current implementation. The reason I did it this was is because these features (in the included files) need to be *outside* of the #content DIV for annoying CSS-y reasons. Is there a way we could make the wrapper smart enough to put parts of a file outside of the main #content DIV and the rest of it inside #content?
(In reply to comment #2) > This is indeed ugly in it's current implementation. The reason I did it this > was is because these features (in the included files) need to be *outside* of > the #content DIV for annoying CSS-y reasons. > > Is there a way we could make the wrapper smart enough to put parts of a file > outside of the main #content DIV and the rest of it inside #content? Yup, that's what my patch does. Each page with a feature sticks the feature content into a "feature" variable, then the wrapper inserts that content above the main content. Pages without a feature don't define the "feature" variable, so the wrapper inserts nothing above the main content.
Comment on attachment 204586 [details] [diff] [review] patch v1: fixes problem Ah, I see - sorry. Yeah, I've tried this patch out in my local copy of the site and it works fine. Can you commit it, or shall I? (thanks)
Attachment #204586 - Flags: review?(steven) → review+
Thanks for the review! I can commit it and have done so: Checking in lib/wrapper.tmpl; /cvsroot/mozilla-com/lib/wrapper.tmpl,v <-- wrapper.tmpl new revision: 1.14; previous revision: 1.13 done Checking in src/index.html; /cvsroot/mozilla-com/src/index.html,v <-- index.html new revision: 1.13; previous revision: 1.12 done Checking in src/firefox/index.html; /cvsroot/mozilla-com/src/firefox/index.html,v <-- index.html new revision: 1.7; previous revision: 1.6 done Checking in src/firefox/livebookmarks.html; /cvsroot/mozilla-com/src/firefox/livebookmarks.html,v <-- livebookmarks.html new revision: 1.4; previous revision: 1.3 done Checking in src/firefox/search.html; /cvsroot/mozilla-com/src/firefox/search.html,v <-- search.html new revision: 1.4; previous revision: 1.3 done Checking in src/firefox/tabs.html; /cvsroot/mozilla-com/src/firefox/tabs.html,v <-- tabs.html new revision: 1.5; previous revision: 1.4 done Checking in src/thunderbird/index.html; /cvsroot/mozilla-com/src/thunderbird/index.html,v <-- index.html new revision: 1.5; previous revision: 1.4 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: [mozilla.com]
Product: mozilla.org → Websites
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: