[Zope] looking into folders for specific entries or add properties to fo lder on creation

Ria Marinussen marinus@cs.utwente.nl
Tue, 9 Apr 2002 11:15:20 +0200


Hi,

In our zope-site we have two types of pages, contained in folders. I want
make the color of the generated URL dependant on the type of page that is in
the folder, while showing the link to the folder.
I use this code to generate the list of url's:
 <table>
  <dtml-in expr="objectValues('Folder')">
   <tr><td><a href="<dtml-var absolute_url>"> <dtml-var
title_or_id></a></td><tr>
  </dtml-in>
 </table>

I would like to be able to show the links in different colors depending on
the content(DTML-method) of the folder (every folder contains only one
DTML-method, folders are to be excluded, so I only have to check the name of
the DTML-method in the folder). 
Is it possible to look inside folders during the generating of this list of
URL's ?

A work-around could be, giving every folder an extra property for example
"type" and check for the content of this property.
The folders and their DTML-method are generated from a python script. Is it
possible to add folders from a python script and add an extra property at
the same time? 
If not, what is my best option: creating a new_folder ZClass like a folder
with an extra property (how?), or creating a new python product (for example
with the mxm Easy product)?

Thanks in advance,
Ria Marinussen