Dashboard > blojsom > ... > Available Plugins > Parameter to Context Plugin
  blojsom Log In   View a printable version of the current page.  
  Parameter to Context Plugin
Added by David Czarnecki, last edited by Cliffano Subagio on Jan 23, 2007  (view change)
Labels: 
(None)

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

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