Geoff Armstrong wrote:

> What I'm trying to do here is avoid using <dtml-in, since in order for it to
> put the object in the namespace it has to iterate over all of them (there
> could be any number).
> All I have at the beginning is the name of the object in the REQUEST part of
> the namespace as picked up from a form. My method is the action to that
> form.
> In DTML there doesn't seem to be a way of saying, "I have this string with
> the name of an object, now fetch me the object."

Hi Geoff,

Try using _.getitem(), as in:
<dtml-let myObject="_.getitem(myId)">
... <dtml-call> ...
or probably:
<dtml-let myObject="_.getitem(REQUEST['myId'])">

If you aren't sure of the existance of the object, wrap the above in:
<dtml-if "_.hasattr(this(), REQUEST['myId'])">


Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to