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

Max M maxm@mxm.dk
Fri, 27 Jun 2003 21:48:34 +0200


Max M wrote:


> try:
>     return item.Title()
> except:
>     if default:
>         return default
>     return item.getId()

Oh yeah. Like if that will work:

title = item.Title().strip() # sometimes a title is a space
if title:
     return title
if default:
     return default
return item.getId()


Max