[Zope] Evaluating a variable that contains a method

Tommy Johnson tommy@7x.com
Tue, 26 Jun 2001 16:11:22 -0800


Hello all,

Here's the situation, and I believe it could work - I just need to find the
proper syntax.

I have a variable that will contain the name of a DTML method; let's call
the variable myVariable. Now, through some code logic, I set the variable to
equal the name of a DTML method; which we'll call methodA. In that method, I
only have some text. So:

myVariable = methodA
methodA --> (contains the text) --> This is some generic text for this
particular method ....

Now, here's the situation. I want to display this variable, which should
call the method, which should render the text inside. Currently, I'm doing
this:

<dtml-var name="myVariable">  but I've also tried <dtml-var
expr="myVariable">

This will return the name of the method (methodA), but not render what's
INSIDE methodA. Does anyone have an idea on how to do that?

Thanks in advance,
Tommy