Ethan, Try something like (tested, but not in this situation, i.e. I use it a lot and it works YMMV): <dtml-with "PARENTS[-1].net" only> <dtml-in "objectValues(['Folder'])"> <dtml-in aq_explicit only> <dtml-unless noshow> do something </dtml-unless> </dtml-in> </dtml-in> </dtml-with> HTH Phil phil.harris@zope.co.uk ----- Original Message ----- From: "mindlace" <mindlace@imeme.net> To: "Michel Pelletier" <michel@digicool.com> Cc: <zope@zope.org> Sent: 25 March 2000 23:10 Subject: Re: [Zope] checking sequence-item variable?
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.
_______________________________________________ Zope maillist - Zope@zope.org 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 )