Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2010 at 14:57 UTC
Updated:
29 Oct 2010 at 14:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
duellj commentedThanks, jhodgdon!
Comment #2
chrisparsons commentedComment #3
chrisparsons commentedFirst attempt... I think I've trimmed the extraneous wording out while still leaving the important information. The only thing that I've trimmed and I'm not sure is extraneous is the wording "is present on every page of the website for users for whom it is present at all", which could be worded much better if it's needed.
Otherwise, the new versions are quite similar to each other:
drupal_add_js:
drupal_add_css:
Patch attached.
Comment #4
chrisparsons commentedSo I got it right in the patch, but wrong when I pasted it above. Here's the drupal_add_css changed 'every_page':
Comment #5
jhodgdon"All ... that have ... are aggregated together" - I think this is a bit misleading. Aggregation only happens if you have aggregation turned on via the Performance page, right?
"Stylesheets without the 'every_page' flag is aggregated into a separate aggregate file."
is -> are
And is this correct -- these are aggregated too? I wasn't aware of that.
I also noticed this further up on http://api.drupal.org/api/function/drupal_add_js/7 :
"If JavaScript aggregation is enabled, all JavaScript files added with $options['preprocess'] set to TRUE will be merged into one aggregate file. Preprocessed inline JavaScript will not be aggregated into this single file. Externally hosted JavaScripts are never aggregated."
This seems to contradict the 'every_page' section...
I think someone needs to delve into the aggregation code and figure out what is actually happening.