roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave <snoopd...@gmail.com>
Subject Re: roller 4.0
Date Sun, 09 Dec 2007 14:43:33 GMT
On Dec 9, 2007 1:35 AM, Odelya Glick <odelya@jpost.com> wrote:
> Is there any chance that version 4.0 has the $site object available not only
> in front page?

You can do this in both 3.1 and 4.0.

What you need to do is to add the SiteModel class to the list of
models that is loaded for normal pages and for entry preview. You can
do this by overriding both the rendering.pageModel and
rendering.PreviewModel properties in your roller-custom.properties
file.

Try adding these to your properties file:

rendering.pageModels=\
org.apache.roller.weblogger.ui.rendering.model.PageModel,\
org.apache.roller.weblogger.ui.rendering.model.ConfigModel,\
org.apache.roller.weblogger.ui.rendering.model.UtilitiesModel,\
org.apache.roller.weblogger.ui.rendering.model.URLModel,\
org.apache.roller.weblogger.ui.rendering.model.MessageModel,\
org.apache.roller.weblogger.ui.rendering.model.CalendarModel,\
org.apache.roller.weblogger.ui.rendering.model.MenuModel,\
org.apache.roller.weblogger.ui.rendering.model.SiteModel

rendering.previewModels=\
org.apache.roller.weblogger.ui.rendering.model.PreviewPageModel,\
org.apache.roller.weblogger.ui.rendering.model.ConfigModel,\
org.apache.roller.weblogger.ui.rendering.model.UtilitiesModel,\
org.apache.roller.weblogger.ui.rendering.model.PreviewURLModel,\
org.apache.roller.weblogger.ui.rendering.model.MessageModel,\
org.apache.roller.weblogger.ui.rendering.model.CalendarModel,\
org.apache.roller.weblogger.ui.rendering.model.MenuModel,\
org.apache.roller.weblogger.ui.rendering.model.SiteModel


By default we don't include the $site model in normal blogs because we
didn't want normal bloggers to have access to data from other
blogger's blogs. If you've got a more controlled environment & you
trust your bloggers or you have disabled template editing then this
should be pretty safe.

Hope that helps.

- Dave

Mime
View raw message