In my web application I use Java Servlets and Freemarker Templates to generate the HTML output. After I have already set up several template files I would like to add a navigation bar throughout all templates. I would like to avoid adding the necessary HTML code to each template file, since when I change it I have to do it all over again.
What is best practice in this case? The only solution I have thought of is defining the navigation bar in another text file and add it through template processing, something like this:
<html>
<head>
<title>...</title>
</head>
<body>
${navigationBarConent}
...
</body>
Mahoni,
If I understand you correctly, this may help.
http://richardbarabe.wordpress.com/2009/03/19/freemarker-a-brief-example/