Posted this a couple days ago on my Liferay blog.
I came across the idea of a generic template recently, and put it to good use. If you don’t know what I mean by generic template, let me clear that up right away.A generic template is really just a content template that is not tied to a structure. The point of it is that you can sparate your template code as you see fit, including the generic templates in your main one. All you need to do is add this line of (velocity markup) code in your template.#parse ("$templatesPath/12345")where 12345 is the template key of your generic template. That’s it. All the code in your generic template gets pulled into your main template and treated as one.There! You know what I mean by generic templates now. So, let’s talk about the fun I had with them. I’ve come to be used to velocity, so the sample code below is all vm.