Try the pattern "#.00".
Chris
-----Original Message-----
From: ashwin ala <
ashwinala@gmai...>
To:
user@stru...
Sent: Sat, Sep 12, 2009 2:30 pm
Subject: RE: Formatting in extended theme using Freemarker
Thank you for the prompt replies.
The BigDecimal rounding somehow always renders the value with extra zeroes
appended.
I had some success with the freemarker number formatting as suggested by
Martin and am getting close to solving this. I changed text.ftl to now use
this line:
<#if parameters.nameValue??><#setting number_format="#.00">
value="<@s.property value="${parameters.nameValue?number}"/>"<#rt/>
</#if>
However it still doesnt render the final 0. For example value "5" should
render as "5.00" but renders as "5.0" Ive tried number_format="#.##" as
well as other combinations with no success.
I'll keep trying different approaches. Please let me know if you can suggest
a solution.
thanks
ash.
opensubscriber is not affiliated with the authors of this message nor responsible for its content.