[Zope] Re: [Zope-dev] Re: external product writing to a file system ?

rossl@med.usyd.edu.au rossl@med.usyd.edu.au
Wed, 02 Jun 1999 01:45:11 -0000


One of us is probably really missing something here. 

I also have no trouble taking files from the file system and stuffing them into zope as dtml from external methods. 

The problem I'm wrestling with is the opposite - I can grab zope dtml objects in external methods, but I can't figure out how to call some mythical function render(foo) the way zope does - converting all the zope bits (such as <!--#var bar-->) into the same html that the zope ORB would. Any advice appreciated...

 <928251944.57469-@fezzik.endicor.com> wrote: 
Original Article: http://www.egroups.com/group/zope/?start=5647

> This is almost trivial to implement.  My filesystemed database app
> looks for *.dtml files as it's walking the fs and loads them as
> dtml methods of the SubDir (folderish) object in which they reside.
> You can use DTMLMethod.add() or handle it directly with the DTMLMethod
> class.  Just send the file contents as the "file=" argument.
> Acquisition works just like with zope dtml methods, though you may
> well need to futz with the object __roles__ when you add it.  You
> also would need to add an 'update' method for the dtml file, which
> I haven't gotten around to yet. I just restart the server right
> now if I need to edit one. :^) 
> 
> Since you can read the dtml source in before creating the method,
> you have the opportunity to handle any potential metadata that you
> may want to store in the dtml source...
> 
> Kent
> 
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://www.zope.org/mailman/listinfo/zope-dev
> 
> (For non-developer, user-level issues, use the companion list,
> zope@zope.org, http://www.zope.org/mailman/listinfo/zope )