> Greetings,
> 
> This seems like it should be a simple thing.... but I can't seem to find how 
> to make dtml-in behave with maps.  In particular, empty maps.
> 
> I've tried mapping, i've tried testing _.len(map.keys()), and various other 
> things.  But it always fails, telling me
> Error Type: KeyError
> Error Value: 0
> 
> What am I missing?
> 
> Have a better one,
> Curtis.


looks  like the variable  that you are using in <dtml-in ...>
is noat a sequence (list || tuple)

I suppose that your var is a dictionary


Insted of :
<dtml-in x mapping>
you have to use:
<dtml-in "[x]" mapping> as a list
||
<dtml-in "(x,)" mapping> as a tuple

PM


_______________________________
"Will I be using Python today?"
 and if the answer is "yes"
 I know that it's going to be a good day.




_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to