[Zope] How to make a script return rendered dtml

Tim Hicks tim@sitefusion.co.uk
Thu, 14 Jun 2001 16:42:42 +0100


I've cracked it:

-------------
print context()
return printed
-------------

this scriptlet rendered the dtml as I had wanted it to do, with the only
problem being that when it came up against a <dtml-var> tag in the zclass
(dtml documentish) instance, it looked within the zclass instead of the
container of the actual instance.  Therefore, I made a guess and found that
this worked as I want:

-------------
print context(context.aq_parent)
return printed
-------------

Using this, the acquisition behaves normally again and all is sweet.

Thanks very much Peter and Eric for you help.

tim

ps If you (or anyone) could explain why the second version behaves as it
does, that would just be a like having a 'cherry on top' :-).