[Zope] Accessing Folder Objects - Newbie Question

James W. Howe jwh@allencreek.com
Fri, 14 Jan 2000 17:00:23 -0500


I have a situation where I want to ask a Folder (actually a ZClass) for a 
subset of the objects it manages.  I want to do this from a DTMLMethod 
which exists in another folder.

For example, suppose I have the following:

FolderA
      NewsArticle1
      NewsArticle2
      FeatureArticle1
      FeatureArticle2

NewsPage (a Folder)
      index.html (a DTMLMethod)

FeaturePage (aFolder)
      index.html (a DTMLMethod)

I would like to do something similar to the following in the NewsPage 
index.html method:

<dtml-in allNewsArticles>
<dtml-var Title>
<dtml-var Teaser>
</dtml-in>

To make this work I would use a URL similar to this:

http://foobar.com/Root/FolderA/NewsPage

FolderA would implement the allNewsArticles method which would answer the 
collection of all contents in FolderA which are a "news article" (probably 
based on the meta-type of the object).

My question is this, what would the code have to look like in 
allNewsArticles to make this work?

Thanks.

James W. Howe				mailto:jwh@allencreek.com
Allen Creek Software, Inc.		pgpkey: http://ic.net/~jwh/pgpkey.html		
Ann Arbor, MI  48103