[Zope] my code doesn't render the if *OR* the else!

Hannu Krosing hannu@tm.ee
Thu, 30 Mar 2000 13:14:13 +0300


Matthew Parslow wrote:
> 
> I have here some Code I'm using to mail people their passwords.
> when get_returner_id doesn't have a ContactEmail value, it hsould say "you
> don't have an entry blah blah", but it displays nothing.
> if there IS an entry, it works fine.

if get_returner_id(xxx) returns an empty list, then it _should_ return
nothing.

as the <dtml-in will be executed 0 times.

> just wondering wtf is going on here.
> (sorry about the code posting)
> 
> <dtml-if Email>
>   <dtml-in "get_returner_id(field='ContactEmail',value=Email)">
>     <dtml-if ContactEmail>
>       Your Password has been emailed to the contact email listed in your return ID entry, <dtml-var ContactEmail><P>
>       <dtml-sendmail smtphost="mail.umd.com.au">
> To: "UMD Customer" <<dtml-var ContactEmail>>
> From: "Unique Micro Design, Service Division" <matt@umd.com.au>
> Subject: Your returner ID and Password
> 
> Someone has requested to be emailed your returns ID password
> Your return ID: <dtml-var ReturnerID>
> Your Password:  <dtml-var Password>
>       </dtml-sendmail>
>     <dtml-else>
>       I'm sorry, a match was not found in the database.<P>
>       <A HREF=mailpassword>Back</A>
>     </dtml-if>
>   </dtml-in>
> <dtml-else>
> (email entering form here)
> </dtml-if>
> 
>