[Zope] Interrogating DTML values from within an External method

Tony McDonald tony.mcdonald@ncl.ac.uk
Thu, 29 Jul 1999 13:08:48 +0100


I've spent all morning on this and searched the Zope and ZDP site to no avail.

How do I get values of dtml variables defined in a DTML document from 
within an external method?

<dtml-in question_set>  - defined as a property in the enclosing 
folder. Use self.question_set - ok.
<dtml-let qidx="_['sequence-item']"> - a variable created in the document.

I use self.qidx and get
  Error type:  AttributeError
  Error value: qidx

Using REQUEST.qidx I get
  Error type:  KeyError
  Error value: qidx

Using REQUEST['qidx'] returns
  Error type:  KeyError
  Error value: qidx

Ideally I want to get the value of a variable created from a ZSQL method,
<dtml-in "get_question(code=qidx)">
(variable correct defined by get_question ZSQL)
</dtml-in>

but that's not working either.

*ANY* thoughts would be appreciated.
tone
------
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5888
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2