[Zope] dtml-return question

James W. Howe james.howe@appnet.com
Mon, 17 Jan 2000 11:53:28 -0500


I want to add a DTMLMethod to a folder which will be used to return a 
subset of the items in the folder.  I've written a method called 
allNewsArticles which looks like this:

<dtml-return "objectValues('NewsArticle')">

I have a method in another folder which references the result of this 
method and it looks like this:

<dtml-in allNewsArticles>
      <... do stuff here...>
</dtml-in>

When I execute the DTMLMethod containing the code above, I get no output 
for the dtml-in.  However, if I do the following in the method above 
(instead of using the allNewsArticles method), I do get output:

<dtml-in "PARENTS[1].objectValues('NewsArticle')">
     <... do stuff here ...>
</dtml-in>

I don't want to use the PARENTS approach because I don't know for sure that 
the immediate predecessor will have the news articles.  Is there a way for 
a DTMLMethod to return a collection of items which are usable by a dtml-in tag?

Thanks.


James W. Howe                  		
AppNet Inc.    		
650 Avis Dr. Suite 100               	mailto:james.howe@appnet.com
Ann Arbor, MI  48108         		http://www.appnet.com