[ZPT] Truncating strings

Ian Bicking ianb at colorstudy.com
Fri Oct 24 11:43:32 EDT 2003


On Friday, October 24, 2003, at 04:08 AM, fergal at esatclear.ie wrote:
> I said this yesterday but no one replied, so here it is again.
>
> Just allow arguments to methods
>
> <span tal:replace="lib/fmt/truncate(container/path/to/var, 
> some/length)">

I don't think I'm suggesting anything in particular here, but Cheetah 
does something similar to path expressions (called namemapper), and its 
solution is to allow these expressions inside Python expressions, i.e., 
$container.path.to.var can show up anywhere, including inside 
expressions.  The analog in ZPT would be to get rid of python: (or 
maybe python: would turn off path expression support, but Python 
expressions would also be allowed without it).

--
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org




More information about the ZPT mailing list