PARENTS[0] not working in dtml-in
Hi Somehow my code isn't working like expected: Without the 1st dtml-in loop the PARENTS[0].objectValues brings the results as expected. If I add the 1st loop the results are wrong. They are on level to low ... Has anyone a idee how I can do this? <dtml-in "objectValues(['kiscImageContainer'])" sort=ImgSequenceNo> //1st <dtml-in "objectValues(['kiscImageDetail'])"> //2nd <dtml-if expr="ImgCoDefaultImageType==ImgDeImageType"> <dtml-in "PARENTS[0].objectValues(['kiscImageDetail'])"> do something </dtml-in> <dtml-var sequence-item> </dtml-if> </dtml-in> </dtml-in> Thanks for your help Stefan
Stefan Mallepell wrote:
Hi
Somehow my code isn't working like expected:
Without the 1st dtml-in loop the PARENTS[0].objectValues brings the results as expected. If I add the 1st loop the results are wrong. They are on level to low ...
Has anyone a idee how I can do this?
<dtml-in "objectValues(['kiscImageContainer'])" sort=ImgSequenceNo> //1st
<dtml-in "objectValues(['kiscImageDetail'])"> //2nd <dtml-if expr="ImgCoDefaultImageType==ImgDeImageType">
<dtml-in "PARENTS[0].objectValues(['kiscImageDetail'])"> do something </dtml-in>
<dtml-var sequence-item> </dtml-if> </dtml-in>
</dtml-in> Thanks for your help Stefan
Are you expecting PARENTS[0] to always return the parent folder of the context? If so use: aq_parent.objectValues[...] otherwise use: _.getitem('sequence-item').aq_parent.objectValues[...] P.S. Please don't post HTML email to the list! hth, -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
Hi Thank you! I'm sorry for the HTML Email ... I was not on my own Maschine ... Kind Regards Stefan ----- Original Message ----- From: "Casey Duncan" <cduncan@kaivo.com> To: "Stefan Mallepell" <steve@syso.ch> Cc: <zope@zope.org> Sent: Monday, April 16, 2001 5:12 PM Subject: Re: [Zope] PARENTS[0] not working in dtml-in
Stefan Mallepell wrote:
Hi
Somehow my code isn't working like expected:
Without the 1st dtml-in loop the PARENTS[0].objectValues brings the results as expected. If I add the 1st loop the results are wrong. They are on level to low ...
Has anyone a idee how I can do this?
<dtml-in "objectValues(['kiscImageContainer'])" sort=ImgSequenceNo> //1st
<dtml-in "objectValues(['kiscImageDetail'])"> //2nd <dtml-if expr="ImgCoDefaultImageType==ImgDeImageType">
<dtml-in "PARENTS[0].objectValues(['kiscImageDetail'])"> do something </dtml-in>
<dtml-var sequence-item> </dtml-if> </dtml-in>
</dtml-in> Thanks for your help Stefan
Are you expecting PARENTS[0] to always return the parent folder of the context? If so use:
aq_parent.objectValues[...]
otherwise use:
_.getitem('sequence-item').aq_parent.objectValues[...]
P.S. Please don't post HTML email to the list!
hth, -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
Hi I still have some problems with this PARENTS thing. Can anyone make me a example of how I should use the "aq_parent.objectValues[]" in a dtml-in syntax. <dtml-in PARENTS reverse> ... <dtml-in _.getitem('sequence-item').aq_parent.objectValues['kiscPage']> <BR><dtml-var id> </dtml-in> ... </dtml-in> Thanks for your help Stefan Mallepell
Are you expecting PARENTS[0] to always return the parent folder of the context? If so use:
aq_parent.objectValues[...]
otherwise use:
_.getitem('sequence-item').aq_parent.objectValues[...]
participants (2)
-
Casey Duncan -
Stefan Mallepell