[Zope] Some questions about ZCatalog

Itai Tavor itavor@bigpond.net.au
Fri, 10 Sep 1999 11:27:00 +1000


Hi,

I can't figure out how to access an object found by a catalog search:

<dtml-let obj="Catalog.getobject(data_record_id_, REQUEST)">
   &dtml-obj;
</dtml-let>

displays the object instance ( <DTMLDocument instance at xxxxxxx> ). But:

<dtml-with "Catalog.getobject(data_record_id_, REQUEST)">
   &dtml-title;
</dtml-with>

returns Unahthorized. Why?

A related question: Instead of accessing the object, like I try to do 
above, I guess I can plug in a brain that will get whatever I need 
from the object and add it to the data record. Is there a simple 
example anywhere of how to implement a simple pluggabale brain for a 
catalog that will do this?

And one more question: The reason I need to do all this is that my 
find page needs to show the titles of the containers of the found 
object, two levels up. I can't index these titles in the catalog, 
because indexing 'title' gets the title of the object, and the 
catalog can't be told to index "PARENTS[1].title" (or can it?). Is it 
possible somehow for a catalog aware object to add properties to its 
entry in the catalog?

BTW, my catalog aware objects are Python products, not ZClasses, if 
that makes a difference.

Thanks
Itai
--
Itai Tavor                      -- "Je sautille, donc je suis."    --
itavor@vic.bigpond.net.au       --               - Kermit the Frog --
-- 'Supposing a tree fell down, Pooh, when we were underneath it?' --
-- 'Supposing it didn't,' said Pooh after careful thought.         --