Importing
Importing
To import OpenDocument Text (.odt) documents to eZ Publish, access the URL example.com/index.php/ezodf/import. (Replace “example.com/index.php” with the URL for the Administration Interface of your eZ Publish site.).
The import screen is shown below. Browse your local filesystem for the .odt file to import, then click on the Upload file button.
After uploading the file, you need to place it in the eZ Publish content node tree. The eZ Publish tree browser window is shown below. Find the container under which you wish to import the file, select the corresponding radio button, then click on the OK button. To cancel the import, simply press the Cancel button.
If the import is successful you will see the screen below that provides a link to the imported object and the option to import more files.
Configuring Imported Documents
OpenDocument Text (.odt) documents are imported into the default eZ Publish content class as specified in the odf.ini configuration file. The title of the object is derived from the filename and the contents of the document are stored in the attributes defined in the odf.ini configuration file located in the extensions/odf/settings/ folder.
The settings below show a configuration example where documents are imported as articles. The title is stored in the title attribute and the document contents are stored in the body attribute.
[ODFImport] DefaultImportClass=article DefaultImportTitleAttribute=title DefaultImportBodyAttribute=body
Sections in .odt documents map to eZ Publish attributes. (Refer to the “Section” chapter in the OpenOffice.org documentation for information about configuring document sections.). For example, you can define sections in an .odt document that map to the title, introduction and body attributes, while another document can be imported as a product content class.
The sample documents in the examples/ folder in the eZODF extension can be used for testing and as a guideline for configuring your site.
Supported Datatypes
When importing OpenDocument Text (.odt) documents, there are some limitations to the datatypes that can store imported content. Currently the following datatypes are supported:
- Text line
- Text fields
- XML text
- Image
- Date
- Date and time
- Matrix
Supported Formatting
When importing text into XML text fields, the following formatting styles are supported:
- Normal text
- Bold and italic text spans
- Text links
- Custom tags (such as a factbox)
- Numbered and bulleted lists (one level)
- Headers (multiple levels)
- Tables (without collapsed rows or columns)
- Embedded images
- Alignment and size are supported
- Image captions are not supported
Ricardo Correia (17/01/2013 4:16 pm)
Ricardo Correia (17/01/2013 4:16 pm)
Comments
There are no comments.