OK, I've got a whole bunch of HTML files (900+) I need to import into a site. The site uses page templates, and I've massaged the files to replace their existing headers with METAL-compliant headers, with all the fill-slots properly created. Now all I need to do is FTP them to the Zope server - piece of cake, right? Except that all the HTML files get created as DTML Documents! How can I configure things so that HTML files get created as Page Templates instead of DTML documents? Failing that, can I convert these in the ZODB to the desired type? ___/ / __/ / ____/ Ed Leafe Linux Love: unzip;strip;touch;finger;mount;fsck;more;yes;umount;sleep
Hi Ed, I ran into this issue awhile back too. See this howto: http://www.zope.org/Members/glpb/dwhowto The second gotcha is what you're looking for. Basically what you need to do is override the ftp put_factory to create zpt's instead of dtml documents. HTH, Andy On Tue, 2004-02-17 at 16:29, Ed Leafe wrote:
OK, I've got a whole bunch of HTML files (900+) I need to import into a site. The site uses page templates, and I've massaged the files to replace their existing headers with METAL-compliant headers, with all the fill-slots properly created. Now all I need to do is FTP them to the Zope server - piece of cake, right? Except that all the HTML files get created as DTML Documents!
How can I configure things so that HTML files get created as Page Templates instead of DTML documents? Failing that, can I convert these in the ZODB to the desired type?
___/ / __/ / ____/ Ed Leafe
Linux Love: unzip;strip;touch;finger;mount;fsck;more;yes;umount;sleep
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
On Feb 18, 2004, at 12:10 PM, Andrew Altepeter wrote:
I ran into this issue awhile back too. See this howto: http://www.zope.org/Members/glpb/dwhowto
The second gotcha is what you're looking for. Basically what you need to do is override the ftp put_factory to create zpt's instead of dtml documents.
Perfect! Exactly what I needed! Thanks! ___/ / __/ / ____/ Ed Leafe Linux Love: unzip;strip;touch;finger;mount;fsck;more;yes;umount;sleep
Ed Leafe wrote at 2004-2-17 17:29 -0500:
... How can I configure things so that HTML files get created as Page Templates instead of DTML documents? Failing that, can I convert these in the ZODB to the desired type?
You want to learn about "PUT_Factory". There is a HowTo on Zope.org. -- Dieter
participants (3)
-
Andrew Altepeter -
Dieter Maurer -
Ed Leafe