[ckan-discuss] Theming CKAN: docs and thoughts
Rufus Pollock
rufus.pollock at okfn.org
Fri May 21 09:42:06 BST 2010
On 20 May 2010 23:39, Friedrich Lindenberg <friedrich at pudo.org> wrote:
> Hi,
>
> On Thu, May 20, 2010 at 8:10 PM, Rufus Pollock <rufus.pollock at okfn.org> wrote:
>> One obvious requirement for people installing new instances of CKAN is
>> to easily re-theme it.
>>
>> I've started a user doc on this here:
>>
>> <http://wiki.okfn.org/ckan/doc/theme>
>>
>> Comments welcome.
>
> I have added a section on overlay directories, which make for an
> extremely easy way to customize CSS and Image files. I don't know
> whether you can overlay Genshi template lookups (Mako can be done with
> some hacking), but that would also be an option.
It depends what you mean by overlay lookups. The extra_template_paths
I mentioned sort-of allows for this. Basically that variable gives a
list of paths to be pre-pended to the genshi search path:
<http://genshi.edgewall.org/wiki/Documentation/0.5.x/plugin.html#template-paths>
Concretely, what this means is that if you create your own directory
and put templates in there, e.g.:
mydir/
mydir/layout.hml
mydir/home/index.html
Those templates will override templates of the same name/path in the
original template layout. Even better, all original (untouched)
templates will work like normal and will use your new templates as
necessary. E.g. if you have an original template like:
ckan/templates/package/index.html
that had and <xi:include href="../layout.html" ... />
It will pull in mydir/layout.html not ckan/templates/layout.html. See
the genshi docs for more detail.
Rufus
More information about the ckan-discuss
mailing list