[Zope] Doubt about the ZPT example in Using Zope Page Templates
Fri, 27 Jun 2003 20:14:28 +0200
Josef Meile wrote at 2003-6-27 12:11 +0200:
> So, I
> that it could solved replacing the line where the titles are written by this
> <td tal:content="python:item.title or default">No Title</td>
> I still don't understand why this sintax doesn't work:
> <td tal:content="python:item/title or default">No Title</td>
Because in Python "/" is the division operator. Therefore
"item/title" in Python is fundamentally different from
"item/title" as path expression.
I usually use in such cases
<XXXX tal:define="title item/title;"
tal:content="python: title or default">....</XXXX>