[Zope] Using <dtml-return...>

Laura McCord Laura.McCord at doucet-austin.com
Thu Oct 14 10:24:48 EDT 2004


Oh, I just realized I could do this:

 return context.your_zpt(
     msg1=resetpassword(myacct='testacct6', mypasswd='findme1.'),
     msg2=testpassword(myacct='testacct6', mypasswd='findme1.')
     )

then in the zpt:
<div tal:condition="options/msg1|nothing"
    tal:content="options/msg1"/>

Thanks for you help.
 Laura

-----Original Message-----
From: McDonnell, Larry [mailto:lmcdonnell at protonenergy.com] 
Sent: Thursday, October 14, 2004 8:56 AM
To: Laura McCord; zope at zope.org
Subject: RE: [Zope] Using <dtml-return...>


Hi,

If you are using zope's acl I have used this.

 <dtml-let user="REQUEST['AUTHENTICATED_USER']"
           userid="user.getUserName()"
 >

 <dtml-unless "user.hasRole( this(), ['Manager'] )">
  <dtml-unless "userid == REQUEST['name']">
   <dtml-raise type="Naughty, Naughty!"> You aren't &dtml-name;, you are
&dtml-userid;! </dtml-raise>
  </dtml-unless>
 </dtml-unless>

 <dtml-call "REQUEST.set( 'roles', user.getRoles() )">  <dtml-call
"REQUEST.set( 'domains', user.getDomains() )">  <dtml-call
"acl_users.manage_users( 'Change', REQUEST )"> </dtml-let>

Larry
-----Original Message-----
From: Laura McCord [mailto:Laura.McCord at doucet-austin.com]
Sent: Thursday, October 14, 2004 9:48 AM
To: zope at zope.org
Subject: [Zope] Using <dtml-return...>



Hi,
 I have a form in a zope page template and when the form is submitted it
uses a dtml method to process this form. In the dtml method I have this:
<dtml-let msg="ValidateForm(username = username, curpasswd=curpasswd,
passwd1=passwd1, passwd2 = passwd2)">  <dtml-return msg> </dtml-let>

How do I send this back to the page that contains the form? I read that
you use dtml-return but how do I display the results in the zope page
template.

Thanks,
 Laura
_______________________________________________
Zope maillist  -  Zope at zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


More information about the Zope mailing list