[Zope] Re: Passing a string to a dtml method

Chris McDonough chrism@zope.com
Sat, 01 Dec 2001 13:46:41 -0500


<dtml-var "email(_.None, _, subject="Here is the subject")">

Arbitrary keyword arguments can be passed in as the third and subsequent 
arguments to DTML methods/documents and they will be looked up and used 
in the called DTML method/document.

Bruce Eckel wrote:
> I do have a question about the anti-spam solution, though. If I
> create a dtml-method, call it "email", like this:
> 
> <FORM METHOD="POST" ACTION="/Util/send">
> <INPUT TYPE="HIDDEN" NAME="name" VALUE="bruce">
> <INPUT TYPE="HIDDEN" NAME="domain" VALUE="EckelObjects.com">
> <INPUT TYPE="HIDDEN" NAME="subject" VALUE="Here is the subject
> line">
> <INPUT TYPE="SUBMIT" VALUE="Send Email to Bruce">
> </FORM>
> 
> is there a way to pass the 'subject' string in during a call to the
> dtml method, so that I could do something like this inside a dtml
> document or method:
> 
> <dtml-var email, subject="Here is the subject line">
> 
> (obviously I can't use that syntax)
> 
> 
> Most current information can be found at:
> http://www.mindview.net/Etc/notes.html
> ===================
> Bruce Eckel    http://www.BruceEckel.com
> Contains free electronic books: "Thinking in Java 2e" & "Thinking
> in C++ 2e"
> Please subscribe to my free newsletter -- just send any email to:
> join-eckel-oo-programming@earth.lyris.net
> My schedule can be found at:
> http://www.mindview.net/Calendar
> ===================
> 
> 
> 


-- 
Chris McDonough                    Zope Corporation
http://www.zope.org             http://www.zope.com
"Killing hundreds of birds with thousands of stones"