[Zope] checking sequence-item variable?

mindlace mindlace@imeme.net
Sat, 25 Mar 2000 23:10:50 +0000


Michel Pelletier wrote:
> 
> mindlace wrote:

> > Well, I clicked send before I should have. This works:
> >
> > <dtml-with "PARENTS[-1].net" only>
> > > <dtml-in "objectValues(['Folder'])">
> > >    <dtml-unless noshow>
> > >     do something
> > >    </dtml-unless>
> > > </dtml-in>
> > </dtml-with>
> >
> > but I don't understand why- I used to have <dtml-with net only> and that
> > didn't work.

I'm sorry, the corrected text above is what works. What never works is
<dtml-with sequence-item only>.  The error I get with <dtml-with
sequence-item only> or <dtml-with _[sequence-item] only> are:

KeyError:
  File /imeme/zope/lib/python/DocumentTemplate/DT_String.py, line 502,
in __call__
    (Object: menu)
  File /imeme/zope/lib/python/DocumentTemplate/DT_With.py, line 148, in
render
    (Object: net)
  File /imeme/zope/lib/python/DocumentTemplate/DT_In.py, line 691, in
renderwob
    (Object: objectValues(['Folder']))
  File /imeme/zope/lib/python/DocumentTemplate/DT_With.py, line 148, in
render
    (Object: sequence-item)
  File /imeme/zope/lib/python/DocumentTemplate/DT_Var.py, line 276, in
render
    (Object: sequence-item)
KeyError: sequence-item

Do you see what I was trying to do?  I wanted to see if just the
sequence-item had the boolean attribute "noshow"

Ethan Fremen
-- 
http://mindlace.net __________________ mindlace@imeme.net
I don't want The Truth but I wouldn't mind a Big Analogy.