As many of us know, it's tricky to edit DTML/ZPT files in GoLive and Dreamweaver because both of them expect valid HTML files to have an extension (to be fair, both allow you to configure these extensions, so we could use something like '.dtml'; we just can't have it be blank.) I think that naming DTML Docs & Methods with extensions is a Bad Thing -- then, links are dependent upon the format of the file. If you switch from a dtml method to a dtml document or to a PageTemplate, you'd have to change your links. (Plus, .extensions make for slightly uglier DTML code; see my message earlier this week about graphic files w/.gif or .jpg extensions.) One possible workaround would be to patch the FTP and WebDAV upload/download so that: * for all the files in a folders, the server would add a simulated extension. For example, for dtml methods, the server would report a file called 'index_html.dtmm', or for dtml documents, 'index_html.dtmd'. * this file could easily be updated by most HTML tools. * when saving this file, the Zope server would re-mangle the filename back to the original. It's definitely a hack, but could be coded in much less time than it will take Macromedia & Adobe to fix their programs. I'd be willing to take a first cut at this, but I'm hoping someone has already done this, or has begun this work. -- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington
* for all the files in a folders, the server would add a simulated extension. For example, for dtml methods, the server would report a file called 'index_html.dtmm', or for dtml documents, 'index_html.dtmd'.
* this file could easily be updated by most HTML tools.
* when saving this file, the Zope server would re-mangle the filename back to the original.
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 ...
It's definitely a hack, but could be coded in much less time than it will take Macromedia & Adobe to fix their programs.
;-)
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. Dieter
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
You know "PUT" factories?
There is a HowTo at Zope.org.
Thanks for the remark! I have heard about customizing "PUT" before, but never got into that much detail. I couldn't actually find the How-To. Do you have a link? Joachim
Hi, --On Samstag, 28. Juli 2001 17:05 +0200 Joachim Werner <joe@iuveno-net.de> wrote:
You know "PUT" factories?
There is a HowTo at Zope.org.
Thanks for the remark! I have heard about customizing "PUT" before, but never got into that much detail.
I couldn't actually find the How-To. Do you have a link?
Joachim
Actually it was a big mess last time I looked at. There seems to be an interface for the FTP/HTTP/DAV methods but it does not include PUT. So I decided to drop using Nullresouce and implementing my own interface which actually works. I'm wondering if we should wait for components with a clear interface or try to clean up what we have now. Regards Tino
participants (4)
-
Dieter Maurer -
Joachim Werner -
Joel Burton -
Tino Wildenhain