23 Feb
2003
23 Feb
'03
12:25 p.m.
Ben M. Thomas wrote: [...]
My TAL condition that I'm attempting to use is something like:
For the Table Header: <span tal:condition="result/Category"> <th>Category</th> </span>
And the Body: <span tal:condition="result/Category"> <td><span tal:replace="result/Category">Category goes here</span></td> </span>
If I understand correctly, you're getting an error when Category is not an attribute of result. I think you are looking for: <th tal:condition="exists:result/Category">Category</th> and <td tal:condition="exists:result/Category" tal:content="result/Category">Category goes here</td> (no need for span tags) Look for "Alternate Paths" and "Exists Expressions" in chp. 9 of the Zope Book HTH, Fernando