velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <>
Subject Re: using #parse or #include to find a template
Date Wed, 21 Jul 2004 16:07:46 GMT
brian said:
> We are going from turbine to velocity standalone and we are trying to
> set the path to find the navigations directory, so far we've tried
> setting the file.resource.loader.path to: templates/app/layouts,
> templates/app/navigations and we also tried to set the path in the
> layout using:

first, please try to use the VelocityLayoutServlet's default WebappLoader and
get that working before you try to get the FileResourceLoader going.

second, "Velocity standalone" knows nothing about any "navigations directory"
or even what a "navigation" is.  for help with layout stuff read this (again):

in there it will talk about using #parse() to do navigation-ish stuff.  this
is not a direct replacement of Turbine's navigations system by any stretch of
the imagination.  keeping that in mind will help you.

> #include("templates/app/navigations/HeaderContents.vm")
> and
> #parse("templates/app/navigations/HeaderContents.vm")
> is there a way to do this without moving everything from under the
> navigations directory?

you should be able to just specify the path to your navigation template from
the directory your resource loader is searching.  e.g. if your resource loader
is only searching the webapp root (as it is by default in the
VelocityViewServlet and VelocityLayoutServlet), and you put your navigations
in a "navigations/" directory under the webapp root, then you should be able
to simply do #parse( "navigations/Header.vm" )

Nathan Bubna

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message