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

Josef Meile jmeile@hotmail.com
Fri, 27 Jun 2003 12:11:56 +0200


I'm sory about posting this comment here, but although I log into zope.org,
I can't
add a comment here:


The thing is that I was trying to figure out how one could add a default
title when a
document doesn't have one. If you run the previous example (see the link
you'll see an ugly cell without borders when a title wasn't provided. 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>

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

but in fact, title is an attribute of item.

Any comments?

Thanks in advanced,