Plugins and URL parameters
From bemoko developer wiki
Parameters can be passed to and from Bemoko plugins in several ways.
The example @ http://bemoko.com/examples/pluginparameters/i shows this in action, with source code @ http://code.google.com/p/bemoko/source/browse/#svn/sites/examples/trunk/pluginparameters. You can also get the source from Subversion and run locally with:
Intent Parameters
When you access an URL on bemokoLive like /i/intentparameter/intent-value. This essentially accesses the intent called "i" with the parameter intentparameter=intent-value. This intent parameter is available in templates with ${intent.intentparameter} and is passed into the execute method of any plugin that implements the void execute(Map p) method. The execute method is called before the page is rendered so you have an opportunity to use this parameter to fetch or interact with any other systems.
Plugin Parameters
Plugins can be configured in the site-config.xml file with parameters, e.g. <param name="pluginconfigparameter">plugin-config-value</param>. These parameters are passed into the void initialise(Map p) method if a plugin implements it. This initialise is method is only called once as the plugin is loaded. If the scope of the plugin is set to "site" then the plugin is loaded once and reused for all request for all users. If the scope of the plugin is set to "session" then the plugin is loaded once for the user and reused for subsequent requests by the same user. Otherwise the scope of plugin is taken as "request" and is reloaded for each request
Custom Configuration
Configuration can also be provided in site custom configuration files and configured in the site-config.xml file, e.g.
<config> <source file="examples~pluginparameters.config"/> </config>
where examples~pluginparameters.config can include parameters like
parameter = "config-value"These configuration parameters can then be accessed in plugins with ${Bemoko.config.parameter} or within a template with ${config.parameter}.
See Custom Configuration for more details.
Further Examples
More examples on plugins and other bemoko features can be found in the bemoko demo which comes with the bemokoLive product - you can see this demo live @ http://bemoko.com/demo/i.
