You are not logged in Log in Join
You are here: Home » Members » gillou » The EpozFile product » About EpozFile

Log in
Name

Password

 

About EpozFile

This is the copy of the README tab of EpozFile

EpozFile

Just like a usual File object with Epoz editing capability if installed.

If the "Epoz" tab doesn't show, just change the Content type to "text/html". Note that creating an EpozFile object assumes this.

Publishing an EpozFile

If the content_type property is not text/html, the EpozFile just acts like a File object.

Otherwise (content_type=text/html), publishing through the Web an EpozFile will look for a template (ZPT, DTML, Python script...) with id EpozFileTemplate in its acquisition path.

If not found, the EpozFile is published like a File. In any other case, it will execute that template pushing itself on top.

How to access to the EpozFile features from that template:

ZPT
here references the EpozFile.
DTML
Use the classical this() if you need namely the EpozFile object, otherwise, the EpozFile is put on top of the namespace.
Python (script)
context refers the EpozFile.

If You need to render a particular EpozFile with another template, just add a string property named EpozFileTemplate and provide the id of the template to be used.

Remeber in any case, that the content of EpozFile is its attribute data.

A ZPT sample :

   ...
   <h2 tal:content="here/title">The title of the EpozFile</h2>
   <div tal:replace="structure here/data">The HTML content of the EpozFile</h2>
   ...

Anyway, you can always publish the content of an EpozFile the old way you did for HTML Files you included in templates :

   ...
   <div tal:define="myepozfile here/tal/path/to/epozfile"
        tal:omit-tag="">
    <h2 tal:content="myepozfile/title">The title of the EpozFile</h2>
    <div tal:replace="structure myepozfile/data">The HTML content of the EpozFile</h2>
   </div>
   ...

ZCatalog awareness

If your content_type is text/html, your content is automatically indexed:

  • Add a ZCatalog named Catalog
  • You may add the following indexes:
    • id : FieldIndex as usual
    • title : FieldIndex too
    • path : PathIndex
    • data : TextIndex or ZCTextIndex, the content of an EpozFile
    • SearchableText : TextIndex or ZCTextIndex, title + content of an EpozFile
    • PrincipiaSearchSource is an alias for SearchableText.
    • any additional Property of your EpozFile with appropriate index type.

Requirements

  • Epoz of course... get it from http://zope.org/Members/mjablonski/Epoz otherwise, EpozFile will just act like a standard File object and thus be useless.
  • An Epoz compatible browser (see your Epoz release doc), with - preferably - cookies enabled.

Bug reports

Before reporting bugs, please ensure first your browser enables cookies and try to reproduce the bug with the latest versions of EpozFile and Epoz.

Please provide a test case, the used browser/OS and the versions of EpozFile, Epoz and Zope.

Feedback

Gilles Lenfant < [email protected] >

Upgrades

Check periodically http://zope.org/Members/gillou/EpozFile for upgrades.

License

This software is provided under terms of the ZPL .

Credits

Many thanks to Maik Jablonski for Epoz