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

Description

Category template plugin allows you to define a separate template for each category in your blog using category.template meta-data.

Availability

This plugin is available as of blojsom 2.23.

Installation and Setup

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

category-template=org.blojsom.plugin.categories.CategoryTemplatePlugin

You may then add "category-template" to one of the flavor-based plugin chains. These plugin chains can be found in the individual blog's plugin.properties file. For example:

html.blojsom-plugin-chain=..., category-template

Usage

In your category meta-data, include a property called category.template which is set to the name of a template. If the template name starts with a '/', blojsom will try to load the name of template using the extension of the template name for the current flavor. If the template name does not start with a '/', blojsom will try to load the name of the template for the current flavor + '-' + category page template name + extension of the template name for the current flavor.

For example, if your flavor.properties contains the following:

html=asual.vm, text/html;charset=UTF-8

And your category meta-data contains the following:

category.template=/another-page

blojsom will try to load another-page.vm located in the blog's templates directory.

If your category meta-data contained the following:

category.template=another-page

blojsom would try to load asual-another-page.vm located in the blog's templates directory.

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