28 Feb
2002
28 Feb
'02
7:05 p.m.
I want to slice a phone number inside of a page template. I am currently using the following syntax to define the area code portion so it can be used to prefil a text input box: <td align="left" valign="top" tal:define="area python:item.home_phone[:2]; pref python:item.home_phone[4:6]; suff python:item.home_phone[8:]"> I get the following template error. <!-- Page Template Diagnostics Compilation failed TAL.TALDefs.TALError: invalid define syntax: 'area', at line 70, column 7 --> I think it's because the colon in the slice directive is confusing tal. How do I get the slice functionality without breaking tal? Is there an escape sequence or something? Thx, Chad
8802
Age (days ago)
8802
Last active (days ago)
0 comments
1 participants
participants (1)
-
Chad Nantais