You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Byron Foster <by...@base2.cc> on 2002/09/10 09:15:24 UTC
#parse in macros library
Hello,
I was wondering if there is an explanation of why the #parse directive
does not work in the global macros library file. Macros defined in a
file referenced by the #parse derective given in the macros main library
file do not seem to be loaded. The issue is that our macros library
file has grown rather large, and we would like to break it into separate
files. Any Suggestions?
Thanks,
Byron
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: #parse in macros library
Posted by Simon Christian <si...@cpd.co.uk>.
Hi Byron,
Not sure what the answer would be to your initial query, but you can
specify multiple library files within the velocity configuration, by
using a comma-separated list of files.
- simon
Byron Foster wrote:
> Hello,
>
> I was wondering if there is an explanation of why the #parse directive
> does not work in the global macros library file. Macros defined in a
> file referenced by the #parse derective given in the macros main library
> file do not seem to be loaded. The issue is that our macros library
> file has grown rather large, and we would like to break it into separate
> files. Any Suggestions?
>
> Thanks,
> Byron
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: #parse in macros library
Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 9/10/02 3:15 AM, "Byron Foster" <by...@base2.cc> wrote:
>
> Hello,
>
> I was wondering if there is an explanation of why the #parse directive
> does not work in the global macros library file. Macros defined in a
> file referenced by the #parse derective given in the macros main library
> file do not seem to be loaded. The issue is that our macros library
> file has grown rather large, and we would like to break it into separate
> files. Any Suggestions?
The reason is that macro resolution happens at template parse time (and VM
library is nothing more than a template...), while #parse() is a runtime
thing.
The solution is to simply break it into separate files. You should be able
to list a set of files, comma separated, for the global library.
--
Geir Magnusson Jr.
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>