roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave <>
Subject Re: Proper way to make custom modules available in themes?
Date Tue, 16 Oct 2007 02:05:00 GMT
On 10/12/07, Fredrik Jonson <> wrote:
> I need to add a small homegrown module for custom user polls to roller,
> so that it is available in the velocity templates of my themes. I've
> looked  around but haven't found any hint on how to achieve that.
> I guess I could write and add a servlet filter that instantiates my
> object and publishes it in the user's session. But I'm hoping there is
> a better, ie more proper way?
> I'm developing on the roller 4.0 release candidate, btw.

Hi Fredrik,

To make your own object available in Roller scripts here's what you do:

1) Have your object implement the Roller interface "PageModel"

2) In your file, override these properties.
For each, you'll have to replicate the original list of classnames
*and* add your new model.

If you just want your object to be available in the aggregated
front-page blog and nowhere else, then add it only to the
rendering.siteModels property.

There is an example model plugin at the following link, but it has not
bee updated for the Roller 4.0 classnames:

- Dave

View raw message