As of SiteMesh 2.0.2 Freemarker (.ftl) decorators are supported.
Here is an example of how such a decorator might look like:
Download Freemarker 2.3 (recommended) and copy it into web-app/WEB-INF/lib. The SiteMesh distribution comes with freemarker.jar v2.3rc3
Add the following to web-app/WEB-INF/web.xml within the <web-app> tag:
test link to flow diagram