[Zope] Accessing Folder Objects - Newbie Question

Jeff K. Hoffman jeff@goingv.com
Fri, 14 Jan 2000 17:17:19 -0500 (EST)


On Fri, 14 Jan 2000, James W. Howe wrote:

> 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?

What about (untested):

  <dtml-return "FolderA.objectValues(['News Article'])">

assuming you don't mind explicitly referencing FolderA.

--Jeff

---
Jeff K. Hoffman                                         704.849.0731 x108
Chief Technology Officer                                mailto:jeff@goingv.com
Going Virtual, L.L.C.                                   http://www.goingv.com/