Description
This plugin will look for blog entry meta-data under the key, "categories". This meta-data must be a comma-separated list of blog categories that are to be associated with the blog entry. In its current form, this plugin creates associated categories that are backed by the filesystem.
Installation and Setup
In your global /WEB-INF/plugin.properties file, add the following line:
associated-categories=org.blojsom.plugin.meta.AssociatedCategoriesPlugin
You may then add "associated-categories" after a plugin such as the meta-plugin which would populate an entry's meta-data. This plugin does not necessarily need to be after any specific plugin, but the meta-data plugin can be used to populated a blog entry's meta-data from meta-data in the blog entry after which this plugin can take advantage of categories in the meta-data. "associated-categories" must be added in the individual user's plugin.properties file.
html.blojsom-plugin-chain=meta,...,associated-categories
Usage and URL Parameters
This plugin works by looking in the blog entry meta-data for information under the key "categories".
There are no URL parameters which control the operation of this plugin.
Context Attributes and Types
The following table describes the context attributes that are available and their associated type.
| Context key |
Input or Output |
Type |
Description |
| BLOJSOM_PLUGIN_ASSOCIATED_CATEGORIES |
Output |
org.blojsom.blog.BlogCategory[] |
BlogCategory objects will be constructed from the associated categories and populated back out as an array of objects. You can then check for the existence of this key in the context object available from your page template. |