On Fri, 27 Jul 2001, Dieter Maurer wrote:
Joachim Werner writes:
I am not sure if this hack wouldn't break some other things. But one advantage of it would be that there would be a way of telling Zope that it should build a ZPT instead of a DTML Document: Just provide another extension (e.g. .zpt instead of .dtmd). Currently I have to create all ZPTs in Zope first ... You know "PUT" factories?
There is a HowTo at Zope.org.
PUT factories can help. (For those on the list that don't know, PUT_factory is a method you can override that allows you to control what kind of documents are created when you add an object to an object manager using FTP/WebDAV. For example, in a folder of Music, you could set it so that every time you add something, it's a DTML Document, but in the folder of Chat, every new document would be a ZWiki. A PUT factory could be programmed to check for a file extension, and create an object of this type. This factory could be placed in the root of the Zope system and handle all FTP puts. Of course, unless you actually want the extensions to be in Zope (ick--I don't want my DTML methods called ".dtmm" or whatever), you'd still have to mangle the extension out, and get it back in for FTP listings and retrievals. I've posted a __very__ simple, way-pre-alpha proof-of-concept for this tonight. -- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington