[Zope] Tal:condition problem

Paul Winkler pw_lists@slinkp.com
Tue, 20 Aug 2002 06:54:56 -0700


On Tue, Aug 20, 2002 at 10:11:30PM +1000, KevinL wrote:
> Heh.  After posting this, I looked closer at your list below, and
> realised you're altering both the macro file name, and the name of the
> macro inside the file.
> 
> That'd require that you be able to replace multiple elements of the
> macro name, rather than a single.  That's not doable atm.  I still
> reckon it should be...  Then you'd be covered by a tal:define="macroName
> string:container/zptmac_${request/id}task/macros/zptmac_${request/id}list".

Sure you can do it, just use python. How about this;

tal:define="macroName python:'container/zptmac_%stask/macros/zptmac_%slist' % (request.form['id'], request.form['id'])"

Or if that's too ugly, make it a python script that takes a single "id"
parameter and just call that.

--

Paul Winkler
"Welcome to Muppet Labs, where the future is made - today!"