13 Aug
2002
13 Aug
'02
2:26 p.m.
On Tue, Aug 13, 2002 at 04:02:44PM +0200, STACCINI PASCAL CHU Nice wrote:
hello I would like to know if there is a way to truncate a string while displaying it in a table using TAL, as the following code allows it in classic DTML code : <dtml-var mystring size=10 etc=", etc.">. actually the TAL code is : <td tal:content=mystring>dummy string</td> thank you for your answer
TAL doesn't provide this, but you can use a python string slice: <td tal:content="python:context.mystring[:10]">dummy string</td> You might need to use something other than "context", depending on where "mystring" comes from. -- Paul Winkler "Welcome to Muppet Labs, where the future is made - today!"