Hi, I 'fixed' this by taking the macro items in TurbineMacrcos.vm and putting them in GlobalMacros.vm. It finds the GlobalMacros.vm macro file but not the TurbineMacros.vm file despite them being in the same directory. Since the line "services.VelocityService.file.resource.loader.path = /templates" is correct I assume it only uses this as a path to get to he screen, layouts and navigation paths?
The GlobalMacros.vm loads due to this line in TR.props I assume services.VelocityService.velocimacro.library = GlobalMacros.vm I went to the Velocity developer guide and from whatI see there I'd say that if I jar'ed the TurbineMacros.vm and put it in WEB-INF/lib then it would be found by the ClassPathLoader. Hope this helps others sorting this out. David > -----Original Message----- > From: David Wynter [mailto:[EMAIL PROTECTED] > Sent: 17 July 2003 18:25 > To: Turbine-User > Subject: Path to find vm templates in T2.3 > > > 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.modificationCheckInt > erval = 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] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
