Jarkko,

Thanks that's exactly what I was looking for. Any ideas on when 1.7 will be
released?

Regards

Ben

2010/3/13 Jarkko Viinamäki-2 <[email protected]>

>
> Unreleased Velocity 1.7 (current SVN head) provides this kind of feature.
>
> A simple example using Velocity syntax:
>
> Declare this macro either in your macro library or parse it in via
> #parse("layoutmacro.vm") or similar
>
> #macro(layout)
> <html><body>$bodyContent</body></html>
> #end
>
> #layout()
> This is the content in bold
> #end
>
> would result in <html><body>This is the content in bold</body></html>
>
>
>
> Ref. https://issues.apache.org/jira/browse/VELOCITY-666
>
>
> benshort 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>
> >
>
> --
> View this message in context:
> http://old.nabble.com/Possible-with-Velocity-tp27875992p27886180.html
> Sent from the Velocity - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to