Re: JPublish 2 with Velocity

Anthony Eden <[email protected]> Mon, 12 May 2003 14:29:46 -0400
Newsgroups gmane.comp.java.jpublish.devel
Message-ID <[email protected]>
Chris,

You can actually refer to any content in any repository using the Velocity #parse directive in JPublish.  JPublish requires a full URL to the content repository though.  For example, let's say you have a content repository called fs_repository which represents the /content directory in your webapp.  If you put your macros in a file called mymacros.vm and put that file in /content then you could include it using the #parse directive as follows:

#parse("repository:fs_repository://mymacros.vm")

If you want to use the VM_global_library.vm file for your macros then that file must be in the WEB-INF/classes directory and you must be using the JPublish code in the CVS (the global library support will be part of the 2.0b4 release but you can get it now from the CVS).

Sincerely,
Anthony Eden

Chris Davis wrote:
> Hello,
> 
> Sorry if this question is off topic here, but I did not find any help in the
> Velocity mailing list archives.
> 
> I am trying to use the Velocity #parse directive to inlcude some Macroes
> into my JPublish .html pages.  The Velocity docs mention that the file path
> target must be relative to TEMPLATE_ROOT.  However, I can not figure out
> where TEMPLATE_ROOT is, for JPublish.
> 
> I also tried placing my macroes in VM_global_library.vm , but was
> unsuccessful.
> 
> Thanks in advance,
> Chris
> 
> 
> 
> -------------------------------------------------------
> Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
> The only event dedicated to issues related to Linux enterprise solutions
> www.enterpriselinuxforum.com
> 
> _______________________________________________
> Jpublish-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jpublish-developer



-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com