[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 &lt;www.mesedilla.com&gt;</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>&gt; -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>&gt; 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>&gt; Sent: Friday, December 28, 2001 05:29 PM</FONT>
<BR><FONT SIZE=3D2>&gt; To: maillists@summitmedia.com.ph</FONT>
<BR><FONT SIZE=3D2>&gt; Cc: zope@zope.org</FONT>
<BR><FONT SIZE=3D2>&gt; Subject: Re: [Zope] dtml-if</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; This is not a dtml-if/dtml-elif problem this is =
a misunderstound</FONT>
<BR><FONT SIZE=3D2>&gt; if/elif/then construct.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; You got all Errors Except 'NotFound' sent thru =
the first dtml-if, and</FONT>
<BR><FONT SIZE=3D2>&gt; the 'NotFound' error is sent thru the dtml-elif =
of </FONT>
<BR><FONT SIZE=3D2>&gt; 'LoginRequired'. You</FONT>
<BR><FONT SIZE=3D2>&gt; can remove all other statements and the result =
will be the same.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Define a list of your unwanted error_types like =
this:</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; error_types =3D [ =
'NotFound',''LoginRequired',...]</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; your if have to something like this:</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; if not ( error_type in error_types ):</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; sysad_send_process</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Regards,</FONT>
<BR><FONT SIZE=3D2>&gt; Dirk</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; maillists@summitmedia.com.ph schrieb:</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; Greetings and Merry Holiday!</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; I need help with dtml-if. I was able to =
successfully implement</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; customized error messages with email =
sending to me.</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; The problem is, I want to avoid receiving =
email when the errors are</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; common like LoginRequired errors.</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; I used this:</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &lt;dtml-if &quot;error_type !=3D =
'LoginRequired'&quot;&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; =
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dtml-var =
sysad_send_process&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &lt;/dtml-if&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; But then I want to avoid additional errors =
and thus:</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &lt;dtml-if &quot;error_type !=3D =
'NotFound'&quot;&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; =
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dtml-var =
sysad_send_process&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &lt;dtml-elif &quot;error_type !=3D 'Not =
Found'&quot;&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; =
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dtml-var =
sysad_send_process&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &lt;dtml-elif &quot;error_type !=3D =
'LoginRequired'&quot;&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; =
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dtml-var =
sysad_send_process&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &lt;dtml-elif &quot;error_type !=3D =
'SMTPSenderRefused'&quot;&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; =
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dtml-var =
sysad_send_process&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &lt;dtml-elif &quot;error_type !=3D 'Bad =
Request'&quot;&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; =
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dtml-var =
sysad_send_process&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &lt;/dtml-if&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; But now, all errors are sent to me. It =
seems like the dtml-if and</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; dtml-elif does not work.</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; What did I do wrong?</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; fritz &lt;www.mesedilla.com&gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; senior systems administrator</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; summit interactive, inc.</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; www.fhm.com.ph | www.femalenetwork.com | =
www.candymag.com</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; ---</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; +basta ikaw Lord</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C18FC1.79E8BB00--