On Tue, Aug 26, 2008 at 12:29 PM, Mullan Colm
<[EMAIL PROTECTED]> wrote:
> Thanks Dave - I found an easier solution, rather than creating plugins,
>
> For anyone doing anything similar where templates are pulled from the
> file system, rather than a specific roller theme. Then a resource loader
> of type file (FileResourceLoader) can be created in the
> velocity.properties file in addition to the
> RollerResourceLoader,WebappResourceLoader and ClasspathResourceLoader .
> As below:
>
> resource.loader = file
> file.resource.loader.class =
> org.apache.velocity.runtime.resource.loader.FileResourceLoader
> file.resource.loader.path = c:/roller/templates
> file.resource.loader.cache = true
> file.resource.loader.modificationCheckInterval = 2
>
> then to display the template -> #parse("templateName.vm")
>
> see the following link ->
> http://www.javaranch.com/journal/2004/03/Velocity-AnIntroduction.html

Nice trick!

- Dave

Reply via email to