[Zope] Zope Eats Memory

Tommy Johnson tommy@7x.com
Thu, 25 Oct 2001 12:13:40 -0800


> you can call a dtml-method like a function with parameters
>
> dtml-method 1 called callTest:
> <dtml-var standard_html_header>
> <dtml-var param1><br>
> <dtml-var param2><br>
> <dtml-var standard_html_footer>
>
> you call this method like so:
> <dtml-var "callTest(None,_,param1=21, param2='was called from far')">
>
> Robert


Yes, I do that alot too. Thought it was preety cool when I first found out.
Now, it's a lifesaver. But, I still need to set REQUEST variables, because
they represent the parameters I'm passing.

Your example:
<dtml-var "callTest(None,_,param1=21, param2='was called from far')">

Mine:
<dtml-var "REQUEST.set('departmentID', '17')">
<dtml-var "REQUEST.set('categoryID', '2')">
<dtml-var "REQUEST.set('productID', '21')">

<dtml-var "callTest(None,_,param1=departmentID, param2=categoryID,
param3=productID)">

Usually, I'll need to set those variables before calling the method. That
way not only is the method dynamic, but the actual call to the method is
dynamic as well.

Tommy
Innovation: The Best Way To Predict The Future ... Is To Create It.