Hiya,

I've just found out about the generated CSS files and the .info file.

There is a team of us working on the same site and we're using Features and Git to work on the same project. So I need to make sure that the theme settings are being saved.

If the theme settings are primarily read from the info file then we should be OK - this file will be versioned once I've moved it the subtheme directory as files/ is not versioned.

(BTW - we use the excellent https://drupal.org/project/stage_file_proxy module to pick up files/ from the live site).

However, if the theme reads from the database first then we need to add the theme settings to the Feature.

No probs - but I'd like to know what the generated .info file is used for - and where a theme gets its settings from by default.

Thanks,

Kevin

Comments

Jeff Burnz’s picture

The generated info file captures your theme settings, i.e. when you want to "lock in" your theme settings you can copy paste the contents of that file to your themes .info file (e.g. for migration purposes). In effect whats in the generated info file is whats in the variable table entry for your theme (I mean the saved theme settings) - so whats in your info file should match perfectly whats in the variable table.

info files are only read when you clear the cache or enable a theme for the first time. theme settings are wee bit different though, its a bit more complicated because what Drupal (and AT) does is first grab the info file then the variable table entry for the themes settings and array_merge them. this is why all theme settings have strings as keys - the latter value (from the variable table) will always override whatever is in the info file.

versioning is the main reason why this theme allows you to save generated files to the theme directory, some users wanted to version the generated files but have them outside of /files/ because that dir is so volatile.