Eric, You are missing the point. I have one layout template, .../app/layouts/Admin/Default.vm, for 12 screen classes. This enforces consistency of look and feel for a given role (Admin) using the system. Having $page.setTitle(..) was very powerful in this context. I see having to create 12 identical layouts with different names and one difference, that is title, as being poor architecture.
I have reverted to VelocityECSLayout by solving the problem with not finding my JavaScript file (don't ask) by extending TemplatePageAttributes to have a method that allows me to setScript(...) and I am happily using VelocityECSLayout again after a brief but painful foray into VelocityOnlyLayout. Thanks for the suggestion though. David -----Original Message----- From: Eric Dobbs [mailto:[EMAIL PROTECTED]] Sent: 16 April 2002 17:35 To: Turbine Users List Subject: Re: Using VelocityOnlyLayout is there a way to setTitle? On Tuesday, April 16, 2002, at 05:27 AM, David Wynter wrote: > When using VelocityOnlyLayout is there a way to set the title from the > screen template? I used to use $page.setTitle("title unique to screen") > in > my screen template but this is only posssible when using > VelocityECSLayout. > Now that the title is set in the Default.vm in the layout sub directory > specific to the role of the user eg. ..../app/layout/Admin/Default.vm I > need > a way to recognise which screen is being used and to somehow get a title > associated with that screen. Has anybody done this before? Is there some reason that just using the HTML isn't working? In the VelocityLayout, you don't get to use HTML to control anything outside the <body> tags. So you have to use $page in order to set a title. Part of what's interesting about VelocityOnlyLayout is that you get to include the rest of the HTML. try this at the top of your .vm: <html> <head><title>title unique to screen</title></head> <body> Hope that helps. -Eric -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
