Re: [Zope] passing method name thru form parameter
Try dtml-var instead of dtml-call. dtml-call discards the output from whatever it calls. I never had a need (so far) to test this, but I think you can do something like: <A href="?method=methods.method1:method"> method1 </a> <A href="?method=methods.method2:method"> method2 </a> and then in the script that gets called do: <dtml-var method> Ayhan Ergul PS: As a sidebar, you better know what you're doing before executing arbitrary methods passed thru url. The same holds for both approaches. --- In zope@y..., Dan Meszaros <dm@p...> wrote:
thanks, Hans,
i had no problem with <dtml-call "methods.method1"> but it gives me no output :( i need to include the output of methods.method1 to that dtml page.
<dtml-call "methods[method1]"> seems not to be working, anyway.
Dan Meszaros wrote:
Hi,
i need to pass the method name thru the url, for example
<A href="?method=methods.method1> method1 </a> <A href="?method=methods.method2> method2 </a> etc.
how do i call the method in dtml document, that gets the method name as a parameter?
doing:
... <dtml-var method> ...
doesn't help, it just shows "methods.method1" string.
<untested> <A href="?method=method1> method1 </a> <A href="?method=method2> method2 </a>
and later
<dtml-call "methods[method]">
assuming methods is a folder </untested> --
__________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com
participants (1)
-
Ayhan Ergul