ez projects / nmcontent
|UNIX name||Owner||Status||Version||Compatible with|
|nmcontent||Eirik Alfstad Johansen||beta||0.2||4.x|
The process of creating/modifying content classes in eZ Publish consists of first planning your content class needs, and then executing the changes that need to be made in the eZ Publish class list.
To aid in the process of creating a content class specification, we have created and made available a separate tool called ezclasspec (for more information, please go to http://projects.ez.no/ezclasspec). Once a specification is completed, it can be exported to a file which can then be imported into nmcontent making the specified changes to the content classes.
The import process will make the following assumptions:
To start the import procedure, go to the URI /nmcontent/classimport
From here, you upload an specification file as produced by ezclasspec when selecting «Export».
When you click «Import», you will be presented with detailed information about what will happen to your classes once the import is completed.
Example of the information you get when clicking «Import» the first time.
By clicking import again, the specified changes will be made to your classes.
The content structure import will convert a nested, unordered list into a node tree
in eZ Publish. Each node should be specified using the following format
[Node name] ([Class identifier/name])
Here is an example of a content structure:
Notice that you can use either the class identifier, or the class name in the parantheses, but identifiers are preferred since they are unique.
The node names will be used as input in the first attribute of the given class (so be aware of objects with special object name patterns).
If a node exists with the same name and class on a given location in the node tree, it will not be duplicated.
If you want the nodes created to contain more information than just a name, you can create a set of dummy nodes which will be used as the basis for the new nodes. When a new node is created, it will check the dummy content container to see if there exists a node of the same class. If so, the dummy node and its contents will be copied and used as the basis for the new node.
TIP: If you find yourself reusing the same content classes with the same dummy content across projects, you might want to look into setting up the ezodf extension to handle multiupload of OpenOffice documents with this content. That way, you won't have to create each individual node in eZ Publish for each project. Check out the odf.ini file in the ezodf extension for more details.
To start the import procedure, go to the URI /nmcontent/structureimport
Here you will be prompted for the following informasjon:
When you're done, click «Import», and the content structure will be imported.
Depending on from where the indented content tree is pasted, nmcontent might have problems parsing it. If possible, try copying and pasting from an OpenOffice document for best effect.