I've just checked in version 1.4 of the theme_support plugin. It contains quite a few bugfixes and updates. This version also integrates a couple of patches from akg and D.J. Vogel. Thanks guys!
Version 1.4 adds:
- Bugfixes, of course
- Better Rails 1.1 support
- ActionMailer theme support (experimental)
- Updates to the themeitem liquid tag
- Support for theme sub-directories
- Fleshed out the Theme object to make is easy to list all of the installed Themes
As a little background, the plugin is based on the theme system developed by the Typo guys and adds support for:
- Multiple concurrent themes
- A rails generator for creating a theme folder structure
- Rake tasks for pre-caching all of the themes for increased security and performance
- Overriding views with theme-specific rhtml or liquid templates (based on early Typo code)
- Forcing theme views to only allow liquid templates
- Made supporting themes as easy as using layouts
To install the plugin, go to your rails application root folder and run:
./script/plugin install http://mattmccray.com/svn/rails/plugins/theme_support
or, for you Windows folks:
ruby script\\plugin install http://mattmccray.com/svn/rails/plugins/theme_support
Look at the README in $/vendor/plugins/theme_support for more on implementing themes in your application.