Themes and Sub-Themes
Just completed Chapter 4 of the Drupal Themes video series and it was extremely helpful for my specific implementation scenario. But I wanted to make sure I'm looking at this correctly before I go down this path fully.
I'm building a platform that will allow me to license 'content' to third party websites. That content will be delivered on a SaaS basis and the content provided will be able to be 'themed' or branded to match the third party website branding standards. I'll setup each website using the multi-site capabilities of Drupal with subdomains (i.e., licensee.mydomain.com). I've created a base theme to deliver the content and individual modules for separately licensed units. So far so good.
Now, if I understand sub-themes correctly, when I setup each licensee, I should be able run them off a single instance of the base theme that will be in the sites/all/themes folder. If I then create a sub-theme and place that sub-theme in a sites/'licensee'/themes folder, I should be able to just do the individual branding/customizations that the licensee would like to see without impacting the main theme. Is that correct?
If that is true, I would just setup the sub-theme .info file with basic 'scaffolding' to make it easy for these changes to be implemented. One question I do have is if, for example, I want to change styling of individual elements, will my style.css file replace the style.css file in the base theme, or will it just override it... meaning if my sub-theme only uses a different background color, that would be the only change I would make to the style.css file in the subtheme folder, with the rest of the base theme settings still being applied. Is this all correct?
One final question. I'm using the template.php file to load individual javascript files for each individual module. Does the template.php file, if placed in the sub-theme directory completely replace the template.php file from the base theme, or does it just execute after the base theme? I'm asking because I might have the need to replace a base them javascript file with a sub-theme javascript file and I'm wondering how that would work.
You should explore documentation for the drupal_add_css() and drupal_add_js() functions. They might be essential to what you are trying to accomplish. Rethink your solution around these and you may come up with a simpler solution.