[Zope] How to skip processing the rest of a dtml document?
Juan Carlos Coruņa
jcoruna@umd.es
Thu, 20 Jul 2000 14:07:01 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_002D_01BFF253.C6BAC700
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by server.bio.umd.es id OAA10093
Hello all,
I`m creating a dtml document with some if clauses embedded that returns a
html page.
But if one of de if clauses evaluates true, I like it returns for example=
a
sentences displaying an error.
Example code:
<HTML>
<HEAD>
<dtml-if action>
<dtml-if "action =3D=3D 'insert line in order'">
....some code that inserts a line in the order....
<dtml-elif "action =3D=3D 'delete line from order'">
....some code that deletes a line from the order....
<dtml-else>
</HEAD>
<BODY>
Error. There is no action or action is incorrect.
</BODY>
</HTML>
......The dtml document must stop here. .......
</dtml-if>
</dtml-if>
</HEAD>
<BODY>
....some code displaying the updated order....
</BODY>
</HTML>
The evaluation of ac must be in the HEAD tag. If ac doesn't exists then t=
he
order is displayed.
Muy atentamente,
Juan Carlos Coru=F1a
Director de Inform=E1tica y Sistemas
jcoruna@umd.es
UMD S.A.
UMD Bilbao, Oficina Central-Headquarters
Ribera de Elorrieta 7
48015 BILBAO
Tel: 902 128 256 / 94 476 29 93
Fax: +34 94 475 07 57
http://www.umd.es
------=_NextPart_000_002D_01BFF253.C6BAC700
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 content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D140114811-20072000>Hello=20
all,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D140114811-20072000></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D140114811-20072000>I`m =
creating a dtml=20
document with some if clauses embedded that returns a html=20
page.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D140114811-20072000></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D140114811-20072000>But if =
one of de if=20
clauses evaluates true, I like it returns for example a sentences =
displaying an=20
error.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D140114811-20072000></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D140114811-20072000>Example=20
code:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D140114811-20072000></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D140114811-20072000><HTML></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D140114811-20072000><HEAD></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D140114811-20072000><dtml-if=20
action></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D140114811-20072000><dtml-if "action=20
=3D=3D 'insert line in order'"></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D140114811-20072000> =20
....some code that inserts a line in the order....</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D140114811-20072000><dtml-elif=20
"action =3D=3D 'delete line from order'"></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D140114811-20072000> =20
....some code that deletes a line from the order....</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D140114811-20072000><dtml-else></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D140114811-20072000> =
</HEAD></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D140114811-20072000> =
<BODY></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D140114811-20072000> =
Error. There=20
is no action or action is incorrect.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D140114811-20072000> =
</BODY></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D140114811-20072000> =
</HTML></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D140114811-20072000> =
......The=20
dtml document must stop here. .......</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D140114811-20072000></dtml-if></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D140114811-20072000></dtml-if></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D140114811-20072000></HEAD></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D140114811-20072000><BODY></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D140114811-20072000> =20
....some code displaying the updated order....</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D140114811-20072000></BODY></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D140114811-20072000></HTML></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D140114811-20072000></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D140114811-20072000>The =
evaluation of ac=20
must be in the HEAD tag. If ac doesn't exists then the order is=20
displayed.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D140114811-20072000></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D140114811-20072000></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Muy atentamente, <BR><BR>Juan Carlos=20
Coru=F1a<BR>Director de Inform=E1tica y Sistemas<BR><A=20
href=3D"mailto:jcorunaartaza@umd.es"><FONT face=3DArial=20
size=3D2>jcoruna@umd.es</FONT></A><FONT face=3DArial=20
size=3D2><BR><BR></FONT><STRONG><FONT color=3D#008080 face=3DArial =
size=3D3>UMD=20
S.A.<BR></FONT></STRONG><FONT face=3DArial size=3D2>UMD Bilbao, Oficina=20
Central-Headquarters<BR>Ribera de Elorrieta 7<BR>48015 BILBAO<BR>Tel: =
902 128=20
256 / 94 476 29 93<BR>Fax: +34 94 475 07 57<BR></FONT><A=20
href=3D"http://www.umd.es/"><FONT face=3DArial=20
size=3D2>http://www.umd.es</FONT></A><FONT face=3DArial=20
size=3D2><BR></FONT></FONT></DIV>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_002D_01BFF253.C6BAC700--