[Zope3-dev] Re: Better access to APIs in paths (was Re: needing viewsclues - template/title troubles)

Chris Withers chrisw@nipltd.com
Tue, 25 Feb 2003 13:13:12 +0000


Evan Simpson wrote:
> I'm not sure whether I am stretching the concept too far, but consider 
> the following:
> 
> <html tal:namespaces="sf http://namespaces.zope.org/string-formats">
> ...
> <span tal:replace="item/total/sf:money">$1,000.00</span>
> 
> That is, 'sf(item.total).money()', where 'item.total' is a number, and 
> the 'string-formats' Adapter wraps it in an Interface capable of 
> converting it into a localized currency string, among many other formats.

It just keeps getting better :-) :-)

Chris