[Zope] DTMLFile usage

Chris Withers chris at simplistix.co.uk
Thu Jan 22 05:32:24 EST 2004


fowlertrainer at anonym.hu wrote:

> So: how to I load an DTML document from file, and render it to string
>     variable as structure ?

For starters, not really sure why you're doing this as a python product. 
Probably easier to just do it as a Script (Python)....

> df1=Globals.DTMLFile('www/index1',globals())
> df2=Globals.DTMLFile('www/index2',globals())

Don't do these in the metho, do them in the global moduel context (ie: don't 
indent them!)

> return df1+"\n"+df2

return df1(self,self.REQUEST)+"\n"+df2(self,self.REQUEST)

cheers,

Chris




More information about the Zope mailing list