Hi; 1. After the MailHost container I call a dtml-var with a page to display for the user. I would like to direct the visitor to a dtml-document in another folder. Using dot notation doesn't help. How do I do this?
A quick (but dirty) way to do it would be to redirect to the absolute_url of the document that you wish the users to see. context.REQUEST.RESPONSE.redirect(_insert your parametes here_)
2. How can I put 2 MailHost containers in one document and have 2 different emails sent out simultaneously?
Have you considered using a python script to generate the two different e-mails and then sending them out from the same MailHost? That would solve the problem nicely. There is a nice writeup about the Mail host on ZopeLabs (http://www.zopelabs.com), specifically, see: http://www.zopelabs.com/cookbook/1004481367 and http://www.zopelabs.com/cookbook/994494801 HTH Ron
At 05:28 PM 12/31/01 +0000, you wrote:
Hi; 1. After the MailHost container I call a dtml-var with a page to display for the user. I would like to direct the visitor to a dtml-document in another folder. Using dot notation doesn't help. How do I do this?
A quick (but dirty) way to do it would be to redirect to the absolute_url of the document that you wish the users to see.
context.REQUEST.RESPONSE.redirect(_insert your parametes here_)
<dtml-call "REQUEST.RESPONSE.redirect('http://constructioncalc.com/<dtml-var size>/eng/Seminars/num/<dtml-var group>')"> This (of course) doesn't work. How do I call the variables *size* and *group* within the context of the dtml-call?
2. How can I put 2 MailHost containers in one document and have 2 different emails sent out simultaneously?
Have you considered using a python script to generate the two different e-mails and then sending them out from the same MailHost?
I'm trying to see how one would do that. The challenges are, there are a bunch of variables passed to the script which need to be captured and utilized in both emails, but some (credit card info) *cannot* be passed to one while it *must* be passed to the other. Can you give me a rough? I can clean it up :))
That would solve the problem nicely. There is a nice writeup about the Mail host on ZopeLabs (http://www.zopelabs.com), specifically, see:
http://www.zopelabs.com/cookbook/1004481367
and
Thanks. I need to review that whole section of their site. TIA, BenO
From: Ben Ocean <zope@thewebsons.com> Date: Mon, 31 Dec 2001 10:43:23 -0800 To: complaw@hal-pc.org Cc: zope@zope.org Subject: Re: [Zope] MailHost Questions
At 05:28 PM 12/31/01 +0000, you wrote:
Hi; 1. After the MailHost container I call a dtml-var with a page to display for the user. I would like to direct the visitor to a dtml-document in another folder. Using dot notation doesn't help. How do I do this?
A quick (but dirty) way to do it would be to redirect to the absolute_url of the document that you wish the users to see.
context.REQUEST.RESPONSE.redirect(_insert your parametes here_)
<dtml-call "REQUEST.RESPONSE.redirect('http://constructioncalc.com/<dtml-var size>/eng/Seminars/num/<dtml-var group>')">
This (of course) doesn't work. How do I call the variables *size* and *group* within the context of the dtml-call?
Isnt' it something like <dtml-call "REQUEST.RESPONSE.redirect('http://constructioncalc.com/'+_.getitem('size')+ '/eng/Seminars/num/'+_.getitem('group'))"> you'd also want to use the built in variable for your site name, instead of hard coding it.
At 02:04 PM 12/31/01 -0500, you wrote:
Isnt' it something like
<dtml-call "REQUEST.RESPONSE.redirect('http://constructioncalc.com/'+_.getitem('size')+ '/eng/Seminars/num/'+_.getitem('group'))">
Well, that produced an ImplicitAcquirerWrapper error. Since I was for some reason able to append a variable at the end of the call, I came up with this elaborate, inelegant solution that works for me: <dtml-elif this_seminar> <dtml-call "REQUEST.set('group',group+'_frame')"> <dtml-if expr="size=='1024'"> <dtml-call "REQUEST.RESPONSE.redirect('http://constructioncalc.com/1024/eng/Seminars/num/'+group)"> <dtml-else> <dtml-call "REQUEST.RESPONSE.redirect('http://constructioncalc.com/800/eng/Seminars/num/'+group)"> </dtml-if> </dtml-if> Any ideas on how to make it cleaner?
you'd also want to use the built in variable for your site name, instead of hard coding it.
Later on that one ;) Thanks, BenO
From: Ben Ocean <zope@thewebsons.com> this elaborate, inelegant solution that works for me:
<dtml-elif this_seminar> <dtml-call "REQUEST.set('group',group+'_frame')"> <dtml-if expr="size=='1024'"> <dtml-call "REQUEST.RESPONSE.redirect('http://constructioncalc.com/1024/eng/Seminars/num/ '+group)"> <dtml-else> <dtml-call "REQUEST.RESPONSE.redirect('http://constructioncalc.com/800/eng/Seminars/num/' +group)"> </dtml-if> </dtml-if>
how about just <dtml-call "REQUEST.RESPONSE.redirect('http://constructioncalc.com/'+var+'/eng/Seminars /num/'+group+'_frame')">
participants (3)
-
Ben Ocean -
complaw@hal-pc.org -
marc lindahl