Re: [Zope] dtml-var question
Evan Simpson <evan@4-am.com> wrote:
----- Original Message ----- From: James W. Howe <jwh@allencreek.com>
I have a DTMLMethod named foo. I can access this method by using the following statement:
<dtml-var foo>
If I wanted to use the "quoted" syntax to access this method (perhaps because it resides in some other folder) which of the following is exactly equivalent to the statement above: [snip] <dtml-var "foo(_.None, _)">
The above is definitely closer, and seems to behave the same in every place I've used it. I can't say for sure that it is *exactly* equivalent, though.
Hmm, maybe <dtml-var expr="foo(_.None, _, REQUEST)"> is closer? -- ========================================================= Tres Seaver tseaver@palladion.com 713-523-6582 Palladion Software http://www.palladion.com
On Mon, 21 Feb 2000, Tres Seaver wrote:
Evan Simpson <evan@4-am.com> wrote:
----- Original Message ----- From: James W. Howe <jwh@allencreek.com>
I have a DTMLMethod named foo. I can access this method by using the following statement:
<dtml-var foo>
If I wanted to use the "quoted" syntax to access this method (perhaps because it resides in some other folder) which of the following is exactly equivalent to the statement above: [snip] <dtml-var "foo(_.None, _)">
The above is definitely closer, and seems to behave the same in every place I've used it. I can't say for sure that it is *exactly* equivalent, though.
Hmm, maybe
<dtml-var expr="foo(_.None, _, REQUEST)">
is closer?
Or maybe <dtml-var expr="foo(this(), _, REQUEST)"> is closer. Heh. ;-) --Jeff --- Jeff K. Hoffman 704.849.0731 x108 Chief Technology Officer mailto:jeff@goingv.com Going Virtual, L.L.C. http://www.goingv.com/
On Mon, 21 Feb 2000, Jeff K. Hoffman wrote:
<dtml-var expr="foo(_.None, _, REQUEST)">
is closer?
Or maybe <dtml-var expr="foo(this(), _, REQUEST)"> is closer.
IMO the exact equivalent is: <dtml-var expr="foo()"> or <dtml-var "foo()"> in both cases and the original one <dtml-var foo> the ZPublisher mechanism will take care to pass the right arguments (and the same set of arguments) to the method. However if you are looking to 'render' the method in the context of the current folder then you could simply do: <dtml-var "_.render(foo)"> and don't worry about client objects etc. For more complicated situations you might need to pass the client object explicitly. Pavlos
We have used: <dtml-var expr="foo(REQUEST,_,_.None)"> noticed the argument order. DR
participants (4)
-
Daniel G. Rusch -
Jeff K. Hoffman -
Pavlos Christoforou -
Tres Seaver