For several times I've run into the Tiles or VelocityLayoutView references and I thought to myself - that's cool, I want to try it out.
The only stopper for me is that I don't know how to elegantly specify the header title in the page.
Example:
Now I don't see how I can specify $title variable, so that it would be rendered properly in layout.vm.Code:<!-- Layout in layout.vm --> <html> <head><title>${title}</title></head> <body>${content}</body </html> <!-- Page Content Template in index.vm --> <p>Hello there!</p>
I'd like to specify it right in index.vm, not in the Controller/Model, not in the Spring's -servlet.xml too
If I just do this in index.vm:
It still won't work right, because layout has been rendered before the #set directive executed.Code:#set($title = "Title1") <p>Hello there</p>
Any advice/hints would be greatly appreciated.


Reply With Quote