Hi,

You can do this with Spring MVC Framework using the VelocityLayoutServlet.

Specifically, configure your site with the Spring
VelocityLayoutViewResolver.

http://static.springsource.org/spring/docs/3.0.x/api/org/springframework/web/servlet/view/velocity/VelocityLayoutViewResolver.html

WILL

On Fri, Mar 12, 2010 at 7:12 AM, Ben Short <[email protected]> wrote:

> Hi Malcom,
>
> Yes I have thought about that pattern.
>
> I'm using spring mvc so that way of doing it wont work for me. What I don't
> want to have to do is
>
> #parse('header.vm')
> <div>
>      <h1>Standard Page</h1>
>  </div>
> #parse('footer.vm')
>
> As cutting a designed page up can be tricky.
>
> Ben
>
> On 12 March 2010 11:16, Malcolm Edgar <[email protected]> wrote:
>
> > In Apache Click we use a similar pattern using Velocity.
> >
> >
> >
> http://click.apache.org/docs/user-guide/htmlsingle/click-book.html#page-templating
> >
> > regards Malcolm Edgar
> >
> > On Fri, Mar 12, 2010 at 10:06 PM, Ben Short <[email protected]> wrote:
> > > Hi,
> > >
> > > With free marker I can do the following:
> > >
> > > layout.ftl
> > >
> > > <#macro layout>
> > > <html>
> > > <head>
> > >    <title>Freemarker Test</title>
> > > </head>
> > > <body>
> > >    <h1></h1>
> > >    <#nested/>
> > > </body>
> > > </html>
> > > </#macro>
> > >
> > > page.ftl
> > >
> > > <#import "layout.ftl" as layout>
> > > <@layout.layout>
> > >  <div>
> > >      <h1>Standard Page</h1>
> > >  </div>
> > > </@layout.layout>
> > >
> > > Is it possible todo the same with velocity?
> > >
> > > Regards
> > >
> > > Ben
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>

Reply via email to