I am very new to Apache Velocity, and I have a little problem finding the best way to structure my templates. In most manuals, I saw that the pages were structured as follows:
#parse("header.vm") <body> ... </body> #parse("footer.vm")
I also saw that someone came close to the "main" template with this approach:
<head> ... </head> <body> #if($activeTab=="home") #parse("home.vm") #elseif($activeTab=="aboutus") #parse("aboutus.vm") ...and so on. </body>
Which seems a little silly, but I think it works.
I used Twirl a lot, so I could be messed up, but I would like to add a template to another, basically getting the main template:
<head> ... </head> <body> $content </body>
And then writing each other pattern as:
Is it possible in speed? If yes, then this is bad practice, and if so, why? Thank you
source share