[Zope] Z Catalog, acquiring title from container?

Art Hampton arth@pacsg.css.mot.com
Mon, 06 Dec 1999 12:32:51 -0600


I've created a simple Z Class ("NewsItem") that contains two items:
headline - the headline for the news item
body - the body of the news item.

I then created a Z Catalog item ("NewsCatalog") that allows me to search
all news items.  That all works great.

But I'm missing one important feature.  I'd like to be able to search on
multiple categories.  Here's a sample of the tree I'm envisioning:

News
  |
  +- Category1
  |    |
  |    +- NewsItem1
  |       NewsItem2
  |       NewsItem3
  |
  +- Category2
  |    |
  |    +- NewsItemA
  |       NewsItemB
  |       NewsItemC
  |
  .
  .
  .
  +- CategoryN

The categories are just folders within which are contained news items.

I want users to be able to select which categories they're interested
in, and display the latest news items from each category.

I was hoping that when I added "title" to the list of items to
index/make meta-data, it would acquire the title of the folder.

Apparently that didn't happen.  I need that to so I can search for the
latest news in the user desired categories.

Is there a way to get the NewsCatalog to be aware of the acquired title
for each item?  Or am I stuck with creating a property for each news
item which is some identifier (the title, some ID number, etc.) which I
assign to the NewsItem at creation/modification time?

Thanks for any input.