SV: [ZPT] More...

Magnus Heino (Rivermen) magnus.heino@rivermen.se
Fri, 14 Sep 2001 11:37:25 +0200


> > > <td tal:content="python:path('item/title') or default">
> > >    <span tal:replace="structure string:&nbsp;">My Title</span>
> > > </td>
> 
> Okay, so now what if title my or may not exist?
> 
> The best I've got is:
> 
> <td tal:content="python:path('item/title | default') or default">
>    <span tal:replace="structure string:&nbsp;">My Title</span>
> </td>
> 
> ...which is pretty yucky ;-)


<td tal:content="here/getTitle">My Title</td>

...and create a python script getTitle that does the work for you.

/Magnus