[Zope] Returning an unrendered DTML Document object to a ZPT

Dominic Hiles Dominic.Hiles@bristol.ac.uk
Fri, 27 Jun 2003 17:52:00 +0100


Hi,

I am passing an unrendered DTML document object to a Zope Page Template, as 
the first item of the list referenced by the 'args' key of the options 
namespace.  I subsequently want to reference the attributes of this object.

I have tried:

<div tal:define="python:nocall(options['args'][0])"></div>

but this gives a split error, the relevant portion of the traceback being:

Module Products.PageTemplates.ZRPythonExpr, line 48, in __call__
__traceback_info__: nocall(options['args'][0])
Module Python expression "nocall(options['args'][0])", line 2, in f
Module Products.PageTemplates.PythonExpr, line 81, in __call__
Module Products.PageTemplates.Expressions, line 158, in __init__
AttributeError: split

Doing:
<div tal:define="nocall: options/args"></div>
correctly returns the 'args' list, with the object as the first item, but I 
can't seem to find the syntax to then reference this first item, without 
using a tal:repeat statement.

Any help would be much appreciated.

Dominic