[Zope] Newbie Zope Question

Paul Winkler pw_lists at slinkp.com
Fri Sep 3 13:55:46 EDT 2004


On Fri, Sep 03, 2004 at 11:32:22AM -0600, Darren Ehlers wrote:
>  I am trying to build a table of properties for each object located in a
> folder. I can get the objects OK, but it doesn't seem to be able to pick the
> user-defined properties (although it does pick up the title property just
> fine).
> 
> Here is the code. Why doesn't this work

Welcome!
First bit of advice: never just say "it doesn't work".  
That is almost never enough information for anyone to help.
Always describe the actual result; if there's an error, 
include the traceback.

Your code should basically work. One suspicion:
 
> <tr tal:repeat="item container/objectValues">

That will include the page template itself.
Does it have all those properties?
If any object in the container is missing even one of those
properties, you'll get an AttributeError.

To make things more fault-tolerant, you can specify a fallback
value, such as the original content of the tag.
Something like this:

 <td class="style2" tal:content="item/coding | default">
   (coding: no value available)
 </td>


-- 

Paul Winkler
http://www.slinkp.com


More information about the Zope mailing list