change plain HTML file to page template?
How can I change a regular html file to be a page template? I can't see anything in properties that would allow this and have even looked at a page template file to see what's different from manage's point of view and can find nothing. Of course, I could create a page template, copy/paste, then rename, but there must be a property of some sort attached to the file, so how... Also, is it possible to create a file from an external source (FTP, etc.) so that file becomes a page template? If not, it's sure be nice to not have to go into the management interface and either create the file, download, edit, the upload or do the create/copy/paste/rename business. Thanks! --Steven
Steven Hodgen wrote:
How can I change a regular html file to be a page template? I can't see anything in properties that would allow this and have even looked at a page template file to see what's different from manage's point of view and can find nothing. Of course, I could create a page template, copy/paste, then rename, but there must be a property of some sort attached to the file, so how...
Are you talking about a File object with content that is HTML? There's no automatic migration path. There is generally no automatic migration between objects of different types, because it usually makes no sense. So you must do it by hand or write a script if you have a lot to do--where "a lot" depends on how fast you can write such a script vs. do it by hand. (Remember: you're dealing with objects, not files.)
Also, is it possible to create a file from an external source (FTP, etc.) so that file becomes a page template? If not, it's sure be nice to not have to go into the management interface and either create the file, download, edit, the upload or do the create/copy/paste/rename business.
http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ExternalTools.stx especially "Caveats" and the "PUT_factory" business. Note that with a PUT_factory making PageTempates, you could presumably rename (or download/upload) a File containing html and create a ZPT. --jcc -- "My point and period will be throughly wrought, Or well or ill, as this day's battle's fought."
participants (2)
-
J. Cameron Cooper -
Steven Hodgen