I'll add it to the Wiki, it is not clearly explained anywhere I could find.
Thanks David > -----Original Message----- > From: Henning P. Schmiedehausen [mailto:[EMAIL PROTECTED] > Sent: 18 July 2003 10:19 > To: [EMAIL PROTECTED] > Subject: Re: Path to find vm templates in T2.3 > > > "David Wynter" <[EMAIL PROTECTED]> writes: > > >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 > > This is one way to do it. > > >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? > > Simply add a second line: > > services.VelocityService.velocimacro.library = macros/TurbineMacros.vm > > to your TR.props and you should be all set. Is this not in the Wiki? > > Velocity will try to load the "macros/TurbineMacros.vm" from the class > path loader. > > % jar tvf target/turbine-2.3-dev.jar | grep -i macros > 0 Fri Jul 18 10:42:06 MEST 2003 macros/ > 4293 Fri Jul 18 10:42:06 MEST 2003 macros/TurbineMacros.vm > > and here it is. :-) > > Multiple velocimacro.library settings are additional, e.g. I have in my > application: > > --- cut --- > # > # Class Path Loader, Turbine jar > services.VelocityService.velocimacro.library = macros/TurbineMacros.vm > # > # Class Path Loader, Toolbox jar > services.VelocityService.velocimacro.library = macros/IntakeMacros.vm > # > # Class Path Loader, Toolbox.jar > services.VelocityService.velocimacro.library = macros/GridMacros.vm > # > # File Loader > services.VelocityService.velocimacro.library = macros/DisplayMacros.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 > 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 > --- cut --- > > Regards > Henning > > -- > Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH > [EMAIL PROTECTED] +49 9131 50 654 0 http://www.intermeta.de/ > > Java, perl, Solaris, Linux, xSP Consulting, Web Services > freelance consultant -- Jakarta Turbine Development -- hero for hire > > --- Quote of the week: "It is pointless to tell people anything when > you know that they won't process the message." --- Jonathan Revusky > > --------------------------------------------------------------------- > 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]
