[Zope] how to pass <dtml-var sequence-item> to an external method from D TML?
J. Cameron Cooper
jccooper@rice.edu
Mon, 06 Aug 2001 15:51:21 -0500
>
>
><dtml-in getPropNames>
> <dtml-var sequence-item> <dtml-var getPropDescription("<dtml-var
>sequence-item>")>
></dtml-in>
>
>Which throws the message:
> Invalid attribute name, """, for tag <dtml-var
>getPropDescription("<dtml-var sequence-item>")>
>
DTML can either use things in its namespace or expressions, which are
little bits of Python. DTML is, unsurprisingly, not parsed in expressions.
You're familiar with things like <dtml-var property>. Expressions are
like <dtml-var expr="arbitrarystuff()">, which is also exactly like
<dtml-var "arbitrarystuff()">, but shorter. Those are the only ways to
call things in DTML. You can't mix and match, lest you drive the parser mad.
In your case, it would be::
Fool, the properties and thier descriptions are
<dtml-in getPropNames>
<dtml-var sequence-item> <dtml-var
"getPropDescription(sequence-item)">
</dtml-in>. Ha!
--jcc
(foolha?)