velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boardtc <>
Subject Global references and parse file location
Date Wed, 26 May 2010 14:11:55 GMT
I have VTL 1.4 like:


I want $column, $column2 and $column2 available in a number of templates, so
am trying to avoid repeaing this code across templates.

Including the above in VM_common_references.vm in the same directory as all
my templates I try a
but get "can not find query template". I have read mention of TEMPLATE_ROOT
not mention where to define it....

Currently my setp includes a velocimacro.library common template:

    public void applicationStartup() throws Exception {
        props.setProperty("velocimacro.library", "VM_macros.vm");
        props.setProperty("resource.loader", "class");
        props.setProperty("class.resource.loader.description", "Classpath


Using a parse means I would have to repeat the name of the common references
file for each use - or put it in a constant. It would be nice if it could be
done via a property perhaps...

Any advice appreciated.



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message