Availability
Parameter to Context Plugin v0.1 can be downloaded from Blojsom2 Plugins download page
.
Overview
Puts all request parameters to the context. Each parameter name will be prefixed by "param_" string, and can conveniently be retrieved from the Velocity templates.
Changelog
v0.1 (26-02-2005): Initial release. Requires Blojsom 2.17 or later.
Build
The Parameter to Context plugin uses Ant to build the source.
ant jar-pkg
Installation
Place param2ctxplugin-version.jar in your /WEB-INF/lib directory.
In your global /WEB-INF/plugin.properties file, add the following line:
param2ctx=com.mbledug.blojsom.plugin.param2ctx.Param2CtxPlugin
Add "param2ctx" to one of the flavor-based plugin chains. This plugin chain can be found in the individual user's plugin.properties file. You can place it anywhere within the chain. For example:
html.blojsom-plugin-chain=param2ctx, ...
Usage
In the template, use velocity syntax with "param_" prefix.
$param_parameter_name
For example: If the URL is http://yourhost.com/blog/default/?first=1&second=2
, you can access the those parameters by using the following syntax:
$param_first
$param_second