Description
The preview plugin allows you to hide "preview" entries from normal display. Preview entries are identified with a configurable prefix at the start of the title of the blog entry. By default, the preview plugin uses the prefix of "PREVIEW" to indicate that an entry is preview only.
Installation and Setup
In your global /WEB-INF/plugin.properties file, add the following line:
preview=org.blojsom.plugin.limiter.PreviewPlugin
You may then add "preview" to one of the flavor-based plugin chains. These plugin chains can be found in the individual user's plugin.properties file. For example:
html.blojsom-plugin-chain=..., preview, ...
The preview plugin can use its own configuration file, preview.properties, that is referenced in /WEB-INF/web.xml.
<init-param>
<param-name>plugin-preview</param-name>
<param-value>/WEB-INF/preview.properties</param-value>
</init-param>
The preview.properties file contains 2 configurable parameters:
TITLE_PREFIX=PREVIEW
PREVIEW_PASSWORD=true
TITLE_PREFIX controls the prefix that indicates an entry is a preview-only entry
PREVIEW_PASSWORD is the password that must be supplied for the "preview" URL parameter to have preview entries displayed
Usage and URL Parameters
Usage
To mark an entry as preview, use the configured prefix at the beginning of the title of your blog entry.
URL Parameters
The following table describes the URL parameters that affect the output of the preview plugin.
| URL parameter |
Accepted values |
Usage |
| preview |
By default, the preview plugin uses the value of "true" to indicate that preview entries should be displayed. However, if you have configured the preview plugin to use a different value to indicate that preview entries should be displayed, then you will need to use that value for the "preview" parameter. |
/blog/?preview=true |