[Zope] Using the DTML REQUEST Object

Berthold Stöger blists at bdf-net.com
Wed Jul 19 13:57:03 EDT 2006


On Tuesday 18 July 2006 19:33, Muk Yan wrote:
> I'm using DTML on Zope (yes I know Plone and Tal is now the norm) and
> I was wondering if regularly using the REQUEST(set and get) object is
> bad practice.

If you want a variable whose scope is a single request, then use the REQUEST
object. If, on the other hand, your purpose is to work around the fact that
DTML is not a general purpose language, but rather a document templating
language, use PythonScripts instead. IMHO, of course.

> I was wondering if there was any way to pass 
> information from DTML Documents to DTML Methods and vice versa (and
> maybe from DTML Methods to DTML Methods) without using the REQUEST
> object.

There's at least two ways to pass variables between DTML-objects:

<dtml-let var1="'one'" var2="'two'">
<dtml-var other_dtml>
</dtml-let>
<dtml-var "other_dtml(_.None,_,var1='three',var2='four')">

HTH


More information about the Zope mailing list