[Zope] Doubt about the ZPT example in Using Zope Page Templates

Geir Bækholt Geir Bækholt
Fri, 27 Jun 2003 12:12:03 +0200


On  Fri, 27 Jun 2003 12:11:56 +0200 GMT
Josef Meile asked the Zope mailinglist about the following:

> I still don't understand why this sintax doesn't work:
> <td tal:content="python:item/title or default">No Title</td>

> It returns:
> Error Type: NameError
> Error Value: global name 'title' is not defined

> but in fact, title is an attribute of item.

item/title is not valid python syntax.

using "python:item.title or default" or even cleaner, a
tales-statement: "item/title | default" just might help..

:)


--
Geir Bækholt