[Zope-dev] ZCatalog

Tom Deprez tom.deprez@uz.kuleuven.ac.be
Wed, 08 Mar 2000 16:01:09 +0100


Hi,

I'm cataloging my own created ZClass, the ZClass also has some methods:

an external method (like David told, yesterday) :

def getParentsEx(self):
    parentsnames = split(self.absolute_url(),'/')[3:-1]
   # [3:-1] removes the host info or use something different to split
on..
   # the -1 removes the last element, i.e. self.id
    return parentsnames

an dtml method getParents_html (just trying if it also works with a
dtml-method) :

<dtml-in PARENTS>
  <dtml-if "_['sequence-item'].meta_type=='KBCategory'" > 
    <dtml-var id>
  </dtml-if>
</dtml-in>

However I've this problem:

1. When I search on the property title. I get all classes which fulfill the
search criteria. However! In the result table, I don't see the values of
getParentsEx or getParents_html. (eg like the values of the id of each
found class).

eg.

GetParents									   Meta
   html                  Id             Title           GetParentsEx
type                                                                          
                       
                       KBItem2          TEST                            KBItem
                       reree            TEST
KBItem 


2. When I fill in a search criteria in the getParentsEx search-box, I do
get the classes back I want. (Except for one, which is also shown, but
normally doesn't match the criteria! strange). And the GetParentsEx values
are equal to the search criteria (in this case KBCat1)

eg.

GetParents									   Meta
   html                  Id             Title           GetParentsEx
type                                                                          
                       
                       KBItem2          TEST              KBCat1        KBItem
                       reree            TEST              KBCat1
KBItem 


Question:

Why aren't the values of GetParentsEx shown in the result table (just like
Meta 
Type is always returned)? What am I doing wrong.
How can you show them?

Question:

Since, I don't see the values of the GetParents_html, I don't know if this
works or what I'm doing wrong... Can it work?


Thanks in advance,

Tom.