Posted by cimo75 on November 30, 2012 at 12:57pm
2 followers
| Project: | Domain Access |
| Version: | 7.x-3.4 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
Hi
I d love to have CSS aggregation as a setting for each domain.
I was wondering wheter it was possible in settings.php with
$conf['preprocess_css']
but since with Domain access we have an unique settings.php file, is there a way to wrap it in a domain selector?
tx
Simone
PS: I d be happy to with a theme based configuration but this is offtopic here of course
Comments
#1
I'm not sure that this is possible. If someone wants to do some testing, I can help look at the results.
#2
Hi
the solution is pretty easy, for something like
http://test.mydomain.comif (isset($_SERVER['HTTP_HOST'])) {if (stristr($_SERVER['HTTP_HOST'],"test")) {
$conf['preprocess_css'] = '0' ;
}
}
S.
#3
No. It's really not, as I have doubts that will get you the proper contextual file aggregation. That would need to be tested thoroughly.
Instead of hacking this in settings.php, the proper way is to add the form element to domain_conf_domain_batch(), then you can toggle it via the UI.
#4
Here's a patch that needs testing. It adds all the "bandwidth optimization" settings from the Performance page.
#5
Wow impressive support, seems to work beautifully.
tx
Simone
(this is perfect for those like me doing some "live" development, I know, I know I should go GIT...)
#6
I just wonder how we can "prove" that this works properly.
Perhaps I'm just being paranoid. If core aggregation techniques are done using the uri as a key, then this should work just fine. I also wonrder about CSS and JS cache clearing, and am not sure how to properly test these behaviors.
#7
Here's the kind of thing I was worried about. I think this is caused by the "gzip" settings. This is a page served from cache.
#8
Yup. Compressing cached pages fails.
#9
Nice artwork... sorry I can t help with that, anyway for my purposes (a side site to start developing along th emain one) the functionality offered by the patch is fine.
S.
#10
No, you need to help with that. Watch out for any odd errors like this one caused by the patch. It also may need a re-roll to remove that setting.
It is errors like that which prevent this feature from ever being committed.
#11
Removed.
#12
Seems all good here, testing....