roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guy Katz" <>
Subject RE: Proper way to make custom modules available in themes?
Date Tue, 16 Oct 2007 11:39:29 GMT
What method should I invoke on the cache manager for maximum
Must I invalidate everything? (there are many methods for invalidation
of folders, users, comments, etc...) I just want to invalidate enough to
have my model displayed properly.
Thanks in advance.

-----Original Message-----
From: Dave [] 
Sent: Tuesday, October 16, 2007 4:05 AM
Subject: Re: Proper way to make custom modules available in themes?

On 10/12/07, Fredrik Jonson <> wrote:
> I need to add a small homegrown module for custom user polls to
> 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