[Zope] Variables...

Dieter Maurer dieter@handshake.de
Thu, 29 Mar 2001 20:12:40 +0200 (CEST)


After Dark writes:
 > Do I need to do a cast or something like that to make this?
 > Because the parameter is an object, but zope treats like a
 > string.
 > <dtml-in "REQUEST['parametro'].objectValues()">
Although not impossible, it is very unlikely that
"REQUEST['parametro']" is itself an object.
Almost surely, it is the name of an object (not the object
itself).

Whenever you have an expression that evaluates to an object
name (in your case "REQUEST['parametro']"), you can
use the function "_.getitem" to turn the name into the
corresponding object. In your case:

      <dtml-in "_.getitem(REQUEST['parametro']).objectValues()">


More details: "Name lookup" section of 

  URL:http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html


Dieter