Freemarker ref:
http://freemarker.sourceforge.net/docs/
A freemarker comment is of the format:
<#-- comment here -->
To test if a field exists you can do something like:
<#if fields.primaryName?exists>
<H3>${fields.primaryName}</H3>
</#if>
Note that "fields" is just a Map that I put in the page data.