Dashboard > blojsom > ... > Available Plugins > Theme Switcher Plugin
  blojsom Log In   View a printable version of the current page.  
  Theme Switcher Plugin
Added by David Czarnecki, last edited by David Czarnecki on Jan 23, 2005  (view change)
Labels: 
(None)

Description

The theme switcher plugin allows you to change the look and feel of your blog by selecting from an available list of installed themes.

Installation and Setup

In your global /WEB-INF/plugin.properties file, add the following line:

theme-switcher=org.blojsom.plugin.admin.ThemeSwitcherPlugin

The theme switcher plugin will automatically be added to the list of configurable plugins for blojsom. You can find this in the web administration console by going to Plugin Settings | Configure available plugins.

The theme switcher plugin, by default, looks for themes in the blojsom installation directory + base configuraton directory + /themes/ sub-directory. For example:

/var/tomcat5/webapps/blojsom/WEB-INF/themes/

You can configure a new themes installation directory by adding a new initialization parameter, themes-directory to your web.xml file under the settings for blojsom servlet. For example:

<init-param>
    <param-name>themes-directory</param-name>
    <param-value>/themes/</param-value>
</init-param>

Any directories here are considered to be the names of the installed themes. These are the theme names that will be available for selection on the theme switcher settings page.

Installed themes contain two sub-directories, resources and templates. Any files in the resources sub-directory will be copied to the blog's resources directory. Any templates in the templates sub-directory will be copied to the blog's templates directory.

A theme can have a default template to be used when the theme is selected. The naming convention for the default template is theme name.extension. For example, if a clown theme is installed in the theme's directory as follows:

/clown/resources/clown-theme.css
/clown/templates/clown.vm

The template used for the flavor that is selected when switching to the clown theme will be clown.vm.

If there is no default template provided by a theme, the template for the selected flavor will not be changed. That would have to be done by changing the flavor configuration through the web administration console Weblog Settings | Flavors.

Required Permissions

A user must have the following permissions in order to use this plugin.

switch_theme

Usage and URL Parameters

Usage

On the theme switcher settings page, a blog can select an available theme and a flavor that should use the theme's main page.

URL Parameters

There are no URL parameters that affect the operation of this plugin.

Site running on a free Atlassian Confluence Open Source Project License granted to blojsom. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators