[Zope] DTML -> ZPT

Tino Wildenhain tino at wildenhain.de
Thu Aug 31 14:54:32 EDT 2006


Antonio Beamud Montero wrote:
> Is this the equivalence?
> 
> <dtml-var day fmt=%02i>
> 
> <td tal:replace="python:'%02i'%item['day']>
> 
> or exists other way?
> 

Yes, you format your output in a (possibly
locales dependant) intermediate layer between
your application and your template.

In the easiest implementation it is a
python script which queries the original
item list and outputs a formattet item list
you use directly w/ path expressions only.

This way you can centrally control and
switch your formatting w/o touching the
templates anymore.

Regards
Tino Wildenhain


More information about the Zope mailing list