[Zope] How to Pass values to a DTML method ??
Stuart Foster
stuartafoster@home.com
Tue, 12 Sep 2000 08:07:22 -0700
The first example is what I was doing. But felt it was hard to follow.
However I would be interested in why it would be considered more robust.
-----Original Message-----
From: Evan Simpson [mailto:evan@4-am.com]
Sent: Monday, September 11, 2000 8:15 PM
To: Stuart Foster; Dieter Maurer
Cc: Zope List
Subject: Re: [Zope] How to Pass values to a DTML method ??
> 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