[Zope] accessing custom properties of file objects

Jesse Goerz jgoerz@cfl.rr.com
20 Jun 2002 01:31:50 -0400


I've been following the Zopebook and I'm trying to customize the file
library.  I have divided the files up into sections by adding a section
property to each file.  Here's a portion of the code:

<div tal:condition="python:item.section == 'c'" 
     tal:omit-tag>
     <td>
      <a href="http://sample"
         tal:attributes="href item/getId" 
         tal:content="item/getId">File_link</a>
     </td>
     <td tal:content="item/file_size">Type</td>
     <td tal:content="item/title">Description</td>
     <td tal:content="item/date_mod" align="center">Last modified</td>
</div>

What's really strange is that this works:
<div tal:condition="python:item.title == 'an_actual_file.zpt'" 
     tal:omit-tag>

I've found some links on "pre-condition" but from what I've read 
(http://www.zope.org/Members/dgeorgieff/howto_precondition) this seems
to apply to dtml.  How do I acess properties which I have created but
aren't normally a part of an object?

tia,
Jesse