[Zope] Method reusability

belen@netcom.no belen@netcom.no
Mon, 09 Jul 2001 15:54:02 +0100


Hello there,

I have a method I am using to download a page to a client:

<dtml-call "REQUEST.RESPONSE.setHeader('content-ype','application/octet-
stream')">
<dtml-call "REQUEST.RESPONSE.setHeader('Content-
Disposition','Attachment; Filename='+document+'.html')">

<dtml-return "StepReport(_.None, TestID=TestID)">


But so far I have not found the way to make it reusable, since I have 
to hard code the parameters I am passing to the document. This means I 
have to have to create as many variations of the method as pages I want 
to download.  Now I cannot think of any way to make my method recognise 
or detect how many and which are the parameters I am receiving, since 
it might vary depending on the document that invokes the method.

<dtml-let param_1=param_1....... param_n=param_n >
<dtml-var  "_['document']">
</dtml-let>

<dtml-return "StepReport(_.None, param_1=param_1,...., 
param_n=param_n )">

Can someone help me please?

Thanks in advance,
Belen