[Zope] Returning Arrays

Michel Pelletier michel@digicool.com
Sun, 05 Sep 1999 15:23:36 -0400


John Goerzen wrote:
> 
> Hi,
> 
> How do I make a DTML method "return" an array?  I know that it's trivial
> to make it return text, but how about an array?
> 
> Specifically, I want to have a method that selects a certain group of objects.
> Then, I want to use this group of objects as part of a dtml-in in another
> method that calls the first.
> 

Create a method called 'documentValues' containing:

<dtml-return "objectValues('DTML Document')">

You can then say in another method:

<dtml-in documentValues>
  <dtml-var id>
</dtml-in>

-Michel

> Ideas?
> 
> Thanks,
> John
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
> 
> (To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
> 
> For developer-specific issues, zope-dev@zope.org -
> http://www.zope.org/mailman/listinfo/zope-dev )