[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Searching and Categorizing Content

webmaster@zope.org webmaster@zope.org
Wed, 09 Oct 2002 20:56:26 -0400

A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/SearchingZCatalog.stx#2-80


    But don't add any new News Items yet, because the second step in this
    exercise is to create a Catalog that will catalog your new News Items.
    Go to the root folder and create a new catalog with the id *Catalog*.

      % Anonymous User - Apr. 15, 2002 12:44 pm:
       Why the root folder? Is it because automatic cataloguing only works within the acquisition path? This should
       be stated more clearly. Perhaps "in the root folder, or any folder that your object will acquire by

      % neves - June 19, 2002 6:40 pm:
       It should be clear that you must use the id "Catalog" for your zcatalog. It 
       is the default name the catalogaware class will search in the acquisition 

      % Anonymous User - July 3, 2002 7:55 am:
       But I need to have different catalogs which work with different z-classes. How can I change the catalog id
       that the class searches for, from the default 'Catalog'?

      % Anonymous User - Oct. 9, 2002 8:56 pm:
       A workaround for me was to use multiple "Catalogs" in different folders. Let's say you have one Catalog in
       the Root Folder and another Catalog in Foo/Foe/Products. If you add a CatalogPathAware ZClass below
       Foo/Foe/Products it will be added to the Catalog in the same folder but not to the Catalog in the Root
       Folder. If you add the ZClass somewhere above Foo/Foe/Products, e.g. Foo, it will be added to the Catalog in
       the Root Folder. This leads to the conclusion that ZClass simply scans upwards in the hierachie for the first
       ZCatalog named "Catalog".