Ben Avery wrote:
thanks - in having to explain the problem, I found it. funny how well
that works as a debugging method.
I'd added my class to rendering.pageModels in roller.properties, but not
to rendering.searchModels
yep. I'm not sure exactly what you custom code is doing and how it's
meant to be used, but in general you only want to put custom model
classes in those properties in your config if you want *all* weblogs to
get those models.
if you only want a certain model to go to one or a limited subset of
weblogs then you can do that be logging in as an admin and going to the
settings page for the weblog and adding it to the 'custom models'
textarea at the bottom of the page. if you put a model in here then
it's available in all views by default, so page, search, etc.
-- Allen
cheers
Ben
Allen Gilliland wrote:
Ben Avery wrote:
hi,
I have added the class org.apache.roller.ui.rendering.model.CustomModel
so I can have custom content without hacking the existing Roller
code. I also use the Velocity library custom.vm for velocity code.
I have a velocity macro showMonthCalendar, which calls a method in
CustomModel to generate a calendar as list of months, from the first
entry to the current time.
This works fine when the blog pages are displayed, but when the
search is used, my Weblog template calls the velocity macro, but the
call to the Java method doesn't reach the Java code, as debugging
output has shown.
Why would this be the case? Do I need to do some extra work when
using the search action rather than the standard blog page rendering
actions?
how did you add your custom model so that it is available to your weblog?
-- Allen
thanks
Ben