Version 9 (modified by ThurnerRupert, 7 years ago) (diff)


Modular styles manager


This plugin simplifies the process of distributing and deploying themes and styles.

In the 0.10 version, the WebAdmin plugin is required.


All of these are under [theme].

Specify which theme to use.
If set to true, the theme can override your header_logo settings with its own logo. (Note: This is true by default)

API Basics

Most themes should simply subclass ThemeBase (in themeengine.api). This works similarly to WikiMacroBase, use you theme name followed by "Theme" as the class name, and put the description as the class's docstring. There are a number of class variable you can define to affect how your theme will be loaded, if any is set to True, it will take on a default value (see below):

The path to the header template. (Defaults to templates/header.cs)
The path to the footer template. (Defaults to templates/footer.cs)
The path to the CSS template. (Defaults to templates/css.cs)
The folder containing the static content. (Defaults to htdocs)
The path to the screenshot file. (Defaults to htdocs/screenshot.png)
A dict containing the data normally in [header_logo] in trac.ini. (Defaults to {})

Packaging A Theme

For lack of a decent guide right now, check out some of the existing themes.

One request, when taking screenshots please make them of the first wiki page, preferably with its default content. Also please make them match the aspect ratio of 640x400.

Choosing a Theme

To select a theme you can either specify it in trac.ini (see below), or use the WebAdmin interface. The web interface does require JavaScript in your browser.

Bugs/Feature Requests

Existing bugs and feature requests for ThemeEnginePlugin are here.

If you have any issues, create a new ticket.

Download and Source

Download the zipped source from here. You can check out ThemeEnginePlugin from here using Subversion, or browse the source with Trac.


To enable:

themeengine.* = enabled

To specify a theme:

theme = <Name>

Recent Changes

[13789] by olemis on 2014-03-22 19:28:16
ThemeEnginePlugin [ refs #11606 ] Do not copy .po and .pot files in bdist archives
Ensure that locale folder will always be deployed thus avoiding KeyError .
[13788] by olemis on 2014-03-22 18:50:02
ThemeEnginePlugin [ fixes #11638 ] Remove x if c else y expressions from templates
[13718] by olemis on 2014-03-03 17:32:52
ThemeEnginePlugin [ fixes #11606 ] : Include the right i18n distutils cmd (no js)

... formerly breaking bdist_* commands.


Author: coderanger

Attachments (3)

Download all attachments as: .zip