You are not logged in Log in Join
You are here: Home » Members » The Haqa @ Zope » Zope Patch to enable conversion of File objects containing text.

Log in
Name

Password

 

Zope Patch to enable conversion of File objects containing text.

This product has been obsoleted by PatchKit

Text File Converter

This product is actually a patch to a number of other Zope object classes. The products it patches are File, DTML Document, and DTML Method, to which it adds a management tab labeled "Text Convert".

Its purpose is to allow you to convert an object containing text content to a DTML Document, DTML Method or ZStyleSheet - http://www.zope.org/Members/haqa/ZStyleSheet (If it is installed). Files like StyleSheets (.css) text files (.txt) Server Parsed HTML (.shtml) and a host of other formats get created as File objects when you add them through xml-rpc, WebDAV, or FTP.

When converting a File object to a DTML Document or a DTML Method a line is added to the begining of the file: <dtml-call "RESPONSE.setHeader(content-type, &lt;&lt;your_content_type&gt;&gt;)"> where <<your_content_type>> is the Content Type on the Edit tab of your File object.

Thanks go to Shane Hathaway for his Refresh Product which contained the patch logic I borrowed.

Adrian Haqa Hungate <[email protected]>

Get it here: http://www.zope.org/Members/haqa/TextConvert