
eZ Publish 3.9 and the eZ Open Document Format Extension
One of the great features in eZ Publish 3.9 is an extension that supports integration with the Open Document Format. In this short tutorial I will explain how to configure the eZODF extension to work on the Windows platform.
Requirements
The eZ Open Document Format extension requires the zip command line program. You can download a free zip binary (zip.exe) from http://www.info-zip.org/pub/infozip/ Download the version that corresponds to your Windows version. Make a “zip” folder under C:\ and copy the zip.exe binary file to the new directory (C:\zip\zip.exe).
Configuration
I will not cover eZ Publish installation since it is very well explained in the online documentation. After eZ Publish is installed, we need to update the eZ Open Document Format extension. The main configuration file is stored in extension\ezodf\settings\odf.ini. First we need to update the path to the zip binary file.
It is important to put “\” at the end of path. A common mistake is that the path is incomplete (for example ZipPath=C:\zip will not work).
For other platforms specify zip path using your OS path notation. (e.g ZipPath=/bin/ on Linux).
That's all. Basic configuration is done. Now we can test import and export.
Import
Before importing, we need to prepare our ODF document. Using the OpenOffice.org Writer's “section” functionality, we can easily map content from an ODF document to eZ Publish article content class attributes. This mapping is defined in:
:extension\ezodf\settings\odf.ini [article] DefaultImportTitleAttribute=title DefaultImportBodyAttribute=body Attribute[title]=title Attribute[intro]=intro Attribute[body]=body
To insert a section do the following:
- Start OpenOffice.org Writer.
- Create a new document.
- From the menu, choose Insert->Section.
- In the “Insert section” window, add a new section called “title” (which maps to the “title” article content class attribute id).
- Add more sections for “intro” and “body”.
- Add content to the sections. The “title” section contains the article's title, the “intro” section contains the article's short introduction and the “body” section will contain the full text with images, tables, bullet lists, and so on.
- Save the document.
You can access the import function in eZ Publish in two ways. Choose “Import OpenOffice.org” from the context menu in the eZ Publish Administration Interface (left mouse click on the folder icon in the content structure tree or the Sub items window) or access the URL http://example.com/admin_siteaccess/ezodf/import. In this example, we'll use the context menu to import the article to the folder where the context menu was invoked.
After invoking the “OpenOffice.org import” option, click “Choose...” and then browse to the ODF file on your system. Then, click the “Upload file” button. eZ Publish will import your document. You can then import another document or view the newly imported content.
For import settings, see the extension\ezodf\settings\odf.ini file.
Export
With the eZ Open Document extension you can easily export eZ Publish content objects to the ODF file format. First, find article object that you want to export. Then, from the context menu, choose “Export OpenOffice.org”. eZ Publish will perform the conversion and then your web browser will prompt you to download and save the file.
For export settings, see the extension\odf\settings\odf.ini file.
Replace
To replace an existing document in eZ Publish with a new version, navigate to the folder in the content structure that contains the document. Then, from context menu (left mouse click on the icon next to the name of the article to replace), choose “Replace OpenOffice.org”. In the next view, choose the new ODF file and click “Upload file”. eZ Publish will replace the old document with the new version.
eZ Open Document Format extension documentation is available in the extension\ezodf\doc directory.






General remarks
Tuesday 06 February 2007 11:18:23 pm
ReaderX
OpenOffice.org integration is one of the more interesting aspects which attracts me to eZ publish.
If you've just done a fresh install, then why does eZ publish already require you to update your configuration and download binaries? I thought it would have come "feature complete."
(As an aside, I'd like to suggest you tweak your blog so that one may click on post titles from the blog index/homepage, so that when one clicks on view comments they are indeed taken to the comments sections rather than the top, and so that when one decides to add comments they are presented with this current input form I'm writing into rather than the top of the page. Ease of use.)