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)
www.mozilla.org
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: myk, Assigned: myk)
Details
(Whiteboard: [mozilla.com])
Attachments
(1 file)
|
4.60 KB,
patch
|
sgarrity
:
review+
|
Details | Diff | Splinter Review |
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 | ||
Comment 1•20 years ago
|
||
| Assignee | ||
Updated•20 years ago
|
Attachment #204586 -
Flags: review? → review?(steven)
Comment 2•20 years ago
|
||
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?
| Assignee | ||
Comment 3•20 years ago
|
||
(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 4•20 years ago
|
||
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+
| Assignee | ||
Comment 5•20 years ago
|
||
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
Updated•19 years ago
|
Whiteboard: [mozilla.com]
Updated•17 years ago
|
Product: mozilla.org → Websites
Updated•13 years ago
|
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.
Description
•