[Zope] TAL: test() or condition Howto?
Elena Schulz
elena.schulz@gmx.net
Fri, 31 Jan 2003 12:12:55 +0100
Hi,
I have the followong TAL-expression:
<td
tal:content="structure python:here.test(myImportantCondition and
myExpensiveMethod(), myExpensiveMethod(),
'myDefaultString')">myDefaultString</td>
To execute 'myExpensiveMethod()' 'myImportantCondition' must be 'true'. But
I want to avoid to execute 'myExpensiveMethod()' two times. How can I achive
that? As default-value myDefaultString should be served.
I don't know a way with tal:condition 'cause on 'false' there is no way to
get 'myDefaultString', isn't it?
-- many thanks for your replies, Elena