Skip to content
sebbacon edited this page Jan 24, 2012 · 12 revisions

A theme is a set of customisations to the user interface, packaged so you don't have to change the core code to make them work.

It's a fast-moving target and these docs may be out of date. However, with a bit of playing and correspondence on the mailing list, it should be fairly obvious how to proceed :)

There's an example theme which can be used as a template, but may be out of date. You could also look at the standard WhatDoTheyKnow theme, or a more up to date and complex theme for AskTheEU which is compatible with Alaveteli 0.4 and above. There's more technical documentation at doc/THEMES.md.

As described in the README in the template theme, you can install these themes (they look quite similar!) with the commands

./script/plugin install git://github.com/sebbacon/alavetelitheme.git

Or

./script/plugin install git://github.com/mysociety/whatdotheyknow-theme.git

The plugin install script downloads the theme from the specified URL and then puts it in vendor/plugins.

In turn, the plugin simply tells Rails to look in its own templates folder at lib/views/ for templates first, before looking elsewhere. Thus it's possible to create custom layouts, custom help pages, and there's also a place to put custom CSS (lib/views/general/custom_css.rhtml).

Clone this wiki locally