[ZPT] TALES
Florent Guillaume
fg@nuxeo.com
12 Feb 2003 19:29:59 +0100
On Wed, 2003-02-12 at 19:24, Evan Simpson wrote:
> Florent Guillaume wrote:
> > How would you do the following in TALES?
> >
> > python:here.foo(1,2,3) | python:here.bar(4,5)
>
> Ooh, tricky. I can only think of two ways, and one is undocumented.
> First, if you could factor "here.foo(1,2,3)" into a Script, you could use:
>
> here/foo123 | python:here.bar(4,5)
>
> If you're willing to use an undocumented expression type that could go
> away in the future, try:
>
> tal:define="foo123 defer:python:here.foo(1,2,3);
> result foo123 | python:here.bar(4,5)"
Hmm, ok, but as I mentionned I'm in a guard expression of an action (in
a workflow it happens) where I'm allowed only one TALES expression and
that's it. So I guess this means there's no way...
So I have, as you mentionned, factored out the first call into a
separate function.
Florent
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com