velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <>
Subject Re: screens directory issues with VelocityLayoutServlet
Date Wed, 21 Jul 2004 15:46:14 GMT
brian said:
> I am displaying the layout template and the templates from the
> navigations directory (which is under the layouts directory)  but when I
> attempt to show any screens, they will not show up,

i don't understand.  what do you mean by "displaying the layout template..."
and how are you "attempt[ing] to show screens"?

> this is the layout:
> #set($pageTitle = "Login")
> <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
> <head>
>       #parse("navigations/HeaderContents.vm")
>       #parse("navigations/ChromeManager.vm")
>       #parse("navigations/ProgressJS.vm")
> </head>
> <body bgcolor="#FFFFE5" onLoad="chromeless(top.location.href);">
>       #parse("navigations/TitleBar.vm")
>       #parse("navigations/LeftNavBar.vm")
> $screen_content
>       #parse("navigations/Footer.vm")
> </body>

if your navigation dir is "under your layout directory" then shouldn't you be
doing #parse( "<my layout dir>/navigations/Foo.vm" )?   or did you add your
layout path to the resource loader's search paths?  if so, why?

> I've tried
>  #parse("screens/Login.vm")
> and
> #include("screens/Login.vm")
> and
> $screen_placeholder

this is all Turbine-ish stuff.  the VelocityLayoutServlet is NOT Turbine.  try
following the provided example rather than doing Turbine things.

>  I've moved the screens directory in different locations with no
> results(page cannot not be found). When I try to put the screens
> directory under layouts, the page loops. Can you please assist?

the default setup for the VLS is to put your screens under the webapp root.
the layout directory would be "under that" as "layout/".   the default layout
should be named Default.vm.  the default error screen should be Error.vm.
then you just request SomeScreenName.vm from the VLS and it will automatically
render that screen within the Default.vm layout.   after you've got that
working, you can begin to customize things.

it seems like you're having problems because A) you're mimicking Turbine
instead of the layout example app  and B) you're not starting simple with
something that is new to you.  get the basics working first.

Nathan Bubna

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

View raw message