[Zope] How to Pass values to a DTML method ??

Evan Simpson evan@4-am.com
Mon, 11 Sep 2000 23:14:31 -0400


> Dieter Maurer
> You should include two positional parameters as well:
>
> <dtml-var "some_method(_.None,_,param=value)">

I've recently had explained to me a way that is more robust, and possibly
less confusing, than this idiotic idiom.  I think it may start appearing in
docs and training.

<dtml-let param="value"><dtml-var some_method></dtml-let>

...or even better...

<dtml-let param="value">&dtml.-some_method;</dtml-let>

...which allows nicely for stuff like:

<dtml-let foo="sequence-item" bar="foo.objectIds()" firstbar="bar[0]">
<a href="&dtml-firstbar;">First!</a>
</dtml-let>

Cheers,

Evan @ digicool & 4-am