The current, forced, location for the local.css file is impractical for sites built on a multi-site configuration of Drupal because the normal location of the theme is in /sites/all/themes/fusion/css which is shared for all sites. There are a couple of possibilities for making this much more useful to multi-site hosted sites:
- Move the default location for local.css from the theme CSS directory into the site's file directory, or a subdirectory of the site's file directory.
- Provide an interface, akin to that provided by several Roople Themes, e.g., Tapestry, to specify the location and name of the file serving the purpose of local.css. This would be particularly useful if a site used several themes that each looked, by default, for a life named local.css. With this option, the default location could remain as it is today.
Comments
Comment #1
jeremycaldwell commentedComment #2
pearcec commentedWe too have the same issue. Right now we include a bunch of themes into our site platform built from a make file. They go into
profiles/xforty/themes/
The only way to get local customizations is to copy your subtheme (say acquia_prosper) into
sites/yoursite.com/themes/
then edit the css/local.css
I was thinking we could modify the fusion_core template.php file to search for the local.css in your site directory if it exists, other wise search the remaining paths for local modifications.
It would be this function
function fusion_core_preprocess_page(&$vars) {
I am planning on doing this. I have shoot back a patch. Does anyone have a better approach? This way we can keep the themes up to date.
Comment #3
stephthegeek commentedI'm actually not sure I understand the feature request. Each Fusion subtheme should have its own local.css file and those are only really intended for contrib themes or future minor overrides by a client or something.
Are you saying that you want multiple sites to be able to use the same theme, but different local.css files? Fortunately, as of Drupal 6.20, sub-subtheming is fully working so you should be sub-theming Acquia Prosper rather than using local.css.
Could one of the posters here elaborate on the use case a bit more?
Comment #4
Branjawn commentedI agree with Stephthegeek.
Example - Theme: Acquia Prosper // Sites: mysite1.com, mysite2.com, mysite3.com
It would be best to install AP in sites/mysite1.com/themes and then edit that one instance of local.css
However, I do see the issue here if you have 30 sites sharing one instance of AP, you don't want to update 30 diff installs each time there is an update available.
Both sides have valid points. I think this warrants further discussion.
Comment #5
pearcec commentedsub sub themes might solve this for me. will look further.
Comment #6
pearcec commentedSo sub sub themes meets our requirements. My developer dking said he did the following. Took fusion_lite, then set the base theme to acquia_pros[er. Now we can edit local.css for each site under multisite. Works like a charm.
We did notice something strange. The local.css is getting included twice. So I am changing this to a bug report.
Comment #7
stephthegeek commentedThe same local.css is getting included twice, or the local.css from both Fusion Lite and Acquia Prosper are being included?
Comment #8
Mel55113 commentedIn response to Comment 3 above:
Yes, I want to be able to use the same installation (typically in sites/all/themes/...) of a fusion based theme for multiple sites (typical multi-site installation) where each site has its own "local.css" file. Ideally, the name should be customizable, in addition to its location. "Simply" adding this as a configuration option for a theme (think Theme Settings API) allows this.
Here's an application from the real world (currently in Drupal 6.x using the Tapestry (http://drupal.org/project/tapestry)) theme: I built a site for a small business client on a shared hosting account. I don't like putting the files directory in /sites/sitename/files, so the files directory is in the root as /files-sitename (actually something shorter, but the idea holds). Instead of using "local.css," I named the site's CSS customization file something else, say xyz.css, and placed it at /files-sitename/xyz.css.
At a later time, I convinced my client to donate a site to their church, using their shared hosting account. To my surprise, the church elected to also use the Tapestry theme (it is a very nice theme, BTW, but probably won't be available for Drupal 7). Again, the church site's files directory is in the root at /files-church. The "local.css" file is at /files-church/abc.css. While the church site was being developed it used the subdomain church.clients-site.com (/sites/church.clients-site.com). To make the installation usable for production the site directory was renamed /sites/church-domain.org.
Regarding the "files" directory location: I frequently install a development site as a sub-domain of a production account. When the site goes live, I simply rename the directory in /sites/sitename and don't have to worry about having any files referenced through /sites/dev-site-name/files.
I'd be happy to answer further questions.
Thanks, Mel
Comment #9
Poieo commented