Hi Jacopo

Have you had a look at any of the stuff here: http://freemarker.sourceforge.net/docs/dgui_misc_whitespace.html ?

It might be possible to find the best of both worlds.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 18/04/2009, at 2:04 AM, Jacopo Cappellato wrote:

What is the best way to format the code of a Fremarker macro containing embedded html code, used to implement the widget renderers?

Let's consider, for example:

<#macro renderFieldTitle style title><#if style?has_content><span class="${style}"></#if>${title}<#if style?has_content></span></#if></ #macro>

Should we try to format it to maximize its readibility? For example:

<#macro renderFieldTitle style title>
   <#if style?has_content>
       <span class="${style}">
   </#if>
   ${title}
   <#if style?has_content>
       </span>
   </#if>
</#macro>

Or should we format it so that the generated code (html) is more readable? For example:

<#macro renderFieldTitle style title><#if style?has_content><span class="${style}"></#if>
 ${title}
<#if style?has_content></span></#if></#macro>

I am trying to improve the new widget macro libraries and I am not sure how to proceed.

Jacopo


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to