I have 2 macro templates in <T2.3_project>/templates/app. It cannot find
either as I get the keyword from my Default.vm ( #TurbineHTMLHead() ) and my
macro names appearing on screen. The 2 macro templates are the supplied
TurbineMacros.vm and my own GlobalMacros.vm.

In the Wiki on VelocityOnlyLayout it gives the following advice.

....
You can uses some Turbine supplied macros if you configure the
ClassPathLoader? in your TR.props. These Macros are in a file called
TurbineMacros?.vm which is part of the Turbine Jar itself.
....

I am not sure what settings are required for ClassPathLoader and it is not
covered by any documentation nor in the archives.

My TR.props config has this:

....
services.VelocityService.runtime.log=/logs/velocity.log
services.VelocityService.velocimacro.library = GlobalMacros.vm

services.VelocityService.resource.loader = file
services.VelocityService.file.resource.loader.description = Velocity File
Resource Loader
services.VelocityService.file.resource.loader.class =
org.apache.velocity.runtime.resource.loader.FileResourceLoader
services.VelocityService.file.resource.loader.path = /templates/app
services.VelocityService.file.resource.loader.cache = false
services.VelocityService.file.resource.loader.modificationCheckInterval = 2

services.VelocityService.resource.loader = classpath
services.VelocityService.classpath.resource.loader.description = Velocity
Classpath Resource Loader
services.VelocityService.classpath.resource.loader.class =
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
....

Any ideas?

Regards

David Wynter


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to