[Zope] dtml-if
maillists@summitmedia.com.ph
maillists@summitmedia.com.ph
Sat, 29 Dec 2001 01:02:47 +0800
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C18FC1.79E8BB00
Content-Type: text/plain;
charset="iso-8859-1"
Yes. That was correct. I did encounter that scenario.
I was able to fix it through your help. Thanks.
fritz <www.mesedilla.com>
senior systems administrator
summit interactive, inc.
www.fhm.com.ph | www.femalenetwork.com | www.candymag.com
---
+basta ikaw Lord
> -----Original Message-----
> From: Dirk Datzert [mailto:Dirk.Datzert@rasselstein-hoesch.de]
> Sent: Friday, December 28, 2001 05:29 PM
> To: maillists@summitmedia.com.ph
> Cc: zope@zope.org
> Subject: Re: [Zope] dtml-if
>
>
> This is not a dtml-if/dtml-elif problem this is a misunderstound
> if/elif/then construct.
>
> You got all Errors Except 'NotFound' sent thru the first dtml-if, and
> the 'NotFound' error is sent thru the dtml-elif of
> 'LoginRequired'. You
> can remove all other statements and the result will be the same.
>
> Define a list of your unwanted error_types like this:
>
> error_types = [ 'NotFound',''LoginRequired',...]
>
> your if have to something like this:
>
> if not ( error_type in error_types ):
> sysad_send_process
>
> Regards,
> Dirk
>
> maillists@summitmedia.com.ph schrieb:
>
> >
> >
> > Greetings and Merry Holiday!
> >
> > I need help with dtml-if. I was able to successfully implement
> > customized error messages with email sending to me.
> >
> > The problem is, I want to avoid receiving email when the errors are
> > common like LoginRequired errors.
> > I used this:
> > <dtml-if "error_type != 'LoginRequired'">
> > <dtml-var sysad_send_process>
> > </dtml-if>
> >
> > But then I want to avoid additional errors and thus:
> > <dtml-if "error_type != 'NotFound'">
> > <dtml-var sysad_send_process>
> > <dtml-elif "error_type != 'Not Found'">
> > <dtml-var sysad_send_process>
> > <dtml-elif "error_type != 'LoginRequired'">
> > <dtml-var sysad_send_process>
> > <dtml-elif "error_type != 'SMTPSenderRefused'">
> > <dtml-var sysad_send_process>
> > <dtml-elif "error_type != 'Bad Request'">
> > <dtml-var sysad_send_process>
> > </dtml-if>
> >
> > But now, all errors are sent to me. It seems like the dtml-if and
> > dtml-elif does not work.
> >
> > What did I do wrong?
> >
> > fritz <www.mesedilla.com>
> > senior systems administrator
> >
> > summit interactive, inc.
> > www.fhm.com.ph | www.femalenetwork.com | www.candymag.com
> > ---
> > +basta ikaw Lord
>
------_=_NextPart_001_01C18FC1.79E8BB00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: [Zope] dtml-if</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>Yes. That was correct. I did encounter that =
scenario.</FONT>
</P>
<P><FONT SIZE=3D2>I was able to fix it through your help. Thanks. =
</FONT>
</P>
<P><FONT SIZE=3D2>fritz <www.mesedilla.com></FONT>
<BR><FONT SIZE=3D2>senior systems administrator</FONT>
</P>
<P><FONT SIZE=3D2>summit interactive, inc.</FONT>
<BR><FONT SIZE=3D2>www.fhm.com.ph | www.femalenetwork.com | =
www.candymag.com</FONT>
<BR><FONT SIZE=3D2>---</FONT>
<BR><FONT SIZE=3D2>+basta ikaw Lord </FONT>
</P>
<P><FONT SIZE=3D2>> -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>> From: Dirk Datzert [<A =
HREF=3D"mailto:Dirk.Datzert@rasselstein-hoesch.de">mailto:Dirk.Datzert@r=
asselstein-hoesch.de</A>]</FONT>
<BR><FONT SIZE=3D2>> Sent: Friday, December 28, 2001 05:29 PM</FONT>
<BR><FONT SIZE=3D2>> To: maillists@summitmedia.com.ph</FONT>
<BR><FONT SIZE=3D2>> Cc: zope@zope.org</FONT>
<BR><FONT SIZE=3D2>> Subject: Re: [Zope] dtml-if</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> This is not a dtml-if/dtml-elif problem this is =
a misunderstound</FONT>
<BR><FONT SIZE=3D2>> if/elif/then construct.</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> You got all Errors Except 'NotFound' sent thru =
the first dtml-if, and</FONT>
<BR><FONT SIZE=3D2>> the 'NotFound' error is sent thru the dtml-elif =
of </FONT>
<BR><FONT SIZE=3D2>> 'LoginRequired'. You</FONT>
<BR><FONT SIZE=3D2>> can remove all other statements and the result =
will be the same.</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Define a list of your unwanted error_types like =
this:</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> error_types =3D [ =
'NotFound',''LoginRequired',...]</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> your if have to something like this:</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> if not ( error_type in error_types ):</FONT>
<BR><FONT SIZE=3D2>> sysad_send_process</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Regards,</FONT>
<BR><FONT SIZE=3D2>> Dirk</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> maillists@summitmedia.com.ph schrieb:</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> ></FONT>
<BR><FONT SIZE=3D2>> ></FONT>
<BR><FONT SIZE=3D2>> > Greetings and Merry Holiday!</FONT>
<BR><FONT SIZE=3D2>> ></FONT>
<BR><FONT SIZE=3D2>> > I need help with dtml-if. I was able to =
successfully implement</FONT>
<BR><FONT SIZE=3D2>> > customized error messages with email =
sending to me.</FONT>
<BR><FONT SIZE=3D2>> ></FONT>
<BR><FONT SIZE=3D2>> > The problem is, I want to avoid receiving =
email when the errors are</FONT>
<BR><FONT SIZE=3D2>> > common like LoginRequired errors.</FONT>
<BR><FONT SIZE=3D2>> > I used this:</FONT>
<BR><FONT SIZE=3D2>> > <dtml-if "error_type !=3D =
'LoginRequired'"></FONT>
<BR><FONT SIZE=3D2>> =
> <dtml-var =
sysad_send_process></FONT>
<BR><FONT SIZE=3D2>> > </dtml-if></FONT>
<BR><FONT SIZE=3D2>> ></FONT>
<BR><FONT SIZE=3D2>> > But then I want to avoid additional errors =
and thus:</FONT>
<BR><FONT SIZE=3D2>> > <dtml-if "error_type !=3D =
'NotFound'"></FONT>
<BR><FONT SIZE=3D2>> =
> <dtml-var =
sysad_send_process></FONT>
<BR><FONT SIZE=3D2>> > <dtml-elif "error_type !=3D 'Not =
Found'"></FONT>
<BR><FONT SIZE=3D2>> =
> <dtml-var =
sysad_send_process></FONT>
<BR><FONT SIZE=3D2>> > <dtml-elif "error_type !=3D =
'LoginRequired'"></FONT>
<BR><FONT SIZE=3D2>> =
> <dtml-var =
sysad_send_process></FONT>
<BR><FONT SIZE=3D2>> > <dtml-elif "error_type !=3D =
'SMTPSenderRefused'"></FONT>
<BR><FONT SIZE=3D2>> =
> <dtml-var =
sysad_send_process></FONT>
<BR><FONT SIZE=3D2>> > <dtml-elif "error_type !=3D 'Bad =
Request'"></FONT>
<BR><FONT SIZE=3D2>> =
> <dtml-var =
sysad_send_process></FONT>
<BR><FONT SIZE=3D2>> > </dtml-if></FONT>
<BR><FONT SIZE=3D2>> ></FONT>
<BR><FONT SIZE=3D2>> > But now, all errors are sent to me. It =
seems like the dtml-if and</FONT>
<BR><FONT SIZE=3D2>> > dtml-elif does not work.</FONT>
<BR><FONT SIZE=3D2>> ></FONT>
<BR><FONT SIZE=3D2>> > What did I do wrong?</FONT>
<BR><FONT SIZE=3D2>> ></FONT>
<BR><FONT SIZE=3D2>> > fritz <www.mesedilla.com></FONT>
<BR><FONT SIZE=3D2>> > senior systems administrator</FONT>
<BR><FONT SIZE=3D2>> ></FONT>
<BR><FONT SIZE=3D2>> > summit interactive, inc.</FONT>
<BR><FONT SIZE=3D2>> > www.fhm.com.ph | www.femalenetwork.com | =
www.candymag.com</FONT>
<BR><FONT SIZE=3D2>> > ---</FONT>
<BR><FONT SIZE=3D2>> > +basta ikaw Lord</FONT>
<BR><FONT SIZE=3D2>> </FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C18FC1.79E8BB00--