[Zope] PARENTS[0] not working in dtml-in

Stefan Mallepell steve@syso.ch
Mon, 16 Apr 2001 17:14:37 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_000A_01C0C698.B6D7AB90
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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=3DImgSequenceNo> =
//1st

  <dtml-in "objectValues(['kiscImageDetail'])"> //2nd
    <dtml-if expr=3D"ImgCoDefaultImageType=3D=3DImgDeImageType">
       =20
      <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


------=_NextPart_000_000A_01C0C698.B6D7AB90
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4611.1300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Somehow my code isn't working like=20
expected:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Without the 1st dtml-in loop the=20
PARENTS[0].objectValues brings the results as expected. If I add the 1st =
loop=20
the results are wrong. They are on level to low ...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Has anyone a idee how I can do =
this?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;dtml-in =
"objectValues(['kiscImageContainer'])"=20
sort=3DImgSequenceNo&gt; //1st</FONT></DIV><FONT face=3DArial size=3D2>
<DIV><BR>&nbsp; &lt;dtml-in "objectValues(['kiscImageDetail'])"&gt;=20
//2nd<BR>&nbsp;&nbsp;&nbsp; &lt;dtml-if=20
expr=3D"ImgCoDefaultImageType=3D=3DImgDeImageType"&gt;<BR>&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dtml-in=20
"PARENTS[0].objectValues(['kiscImageDetail'])"&gt;<BR>&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do=20
something<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dtml-in&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dtml-var=20
sequence-item&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/dtml-if&gt;<BR>&nbsp;=20
&lt;/dtml-in&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;/dtml-in&gt;<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for your help</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Stefan<BR></DIV></FONT></BODY></HTML>

------=_NextPart_000_000A_01C0C698.B6D7AB90--