[Zope] Creating and adding to Dictionary using dtml?

Joel Burton jburton@scw.org
Wed, 25 Jul 2001 11:11:59 -0400 (EDT)


On Wed, 25 Jul 2001, Richard Ettema wrote:

> Hi,
> 
> If I have created a dictionary with...
> <dtml-call "REQUEST.set('the_list',{})">
> 
> How do I add a 'name':value pair to this using dtml?

As you said, create the dict with:
  <dtml-call "REQUEST.set('the_list', {})">

or, nicer, use the dtml-set patch:
  <dtml-set the_list="{}">

in either case, update the dict with 
  <dtml-call "the_list.update( { 'newkey':'newval' } )">

hth,
-- 
Joel Burton   <jburton@scw.org>
Director of Information Systems, Support Center of Washington