[Zope] passing parameter to dTML-method from a dtml-method
Paul-André Duchesne
Paul-Andre.Duchesne at sciencesnaturelles.be
Tue Aug 19 10:54:23 EDT 2003
Thanks Dieter,
I've used finally a solution which is close to the first one you suggested
(with the dtml-let): I've defined a variable in the REQUEST namespace and I
use this variable in the dtml-method I call...
Thanks again for the answer,
Paul
On Monday 18 August 2003 20:22, you wrote:
> Paul-Andre.Duchesne at sciencesnaturelles.be wrote at 2003-8-17 18:54 +0200:
> > I've created a dtml-method that do different things based on the value
> > of a parameter passed.
> > So, for example, my method is called test and when i try to invoke
> > through my browser the method with the parameter and a value it works
> > fine this way:
> >
> > http://www.test.com/test?parameter=value
> >
> > What I would like to do now is to call this method from an other method
> > and to pass the parameter and the value programatically, so for example
> > something like:
> >
> > <dtml-var test?parameter=value>
> >
> > how can I do that... ?
>
> DTML objects pass their DTML namespace implicitly to called DTML objects.
>
> Therefore, the easiest way to pass parameters is:
>
> <dtml-let
> param1=value1
> param2=value2
> ...
>
> <dtml-call|var dtmlObject>
> </dtml-let>
>
>
> Alternatively, you can call "dtmlObject" explicitely:
>
> <dtml-call|var expr="dtmlObject(_.None,_,param1=value1,param2=value2)">
>
> Do not forget to pass "_.None,_". There are essential (in some
> circumstances).
>
>
> Dieter
More information about the Zope
mailing list