The content class

These documentation pages are no longer maintained. Please visit the new documentation site.

A content class is simply a definition of an arbitrary data structure. A content class doesn't store any actual data. As mentioned earlier, eZ publish comes with a set of predefined, ready-to-use content classes such as "folder", "article", "user account", "image", etc. These content classes are carefully designed to fit the most common generic/everyday tasks of a CMS. In addition, it is possible to create custom content classes using the administration interface. The content classes (both custom and built-in) may be easily modified and/or extended at any time. Appendix D contains a complete list of the built-in content classes.

Content class attributes
Each content class is made up of attributes, hence a collection of attributes define the actual data structure of a content class. An attribute can be a text string, an integer, a float, an image, etc. The type of the attribute is determined by the datatype that is chosen for that specific attribute. In other words: each content class is made up of one or more attributes where each attribute is of a specific datatype. Content classes can be built and modified easily using the administration interface.

Example
Lets assume that we would like to store information about fruits. The information we wish to store is the name of the fruit, its weight and color. We could easily create and build a content class called "Fruit" with three attributes: name, weight and color. The string datatype could be used to represent the name and the color while the weight attribute could be represented using the integer datatype:

Content class: Fruit

 

            Attribute name   Datatype

---------------------------------------

Attribute 1: Name             Text

Attribute 2: Weight           Integer

Attribute 3: Color            Text

Comments

Aggregation

I miss here class aggregation, i.e. including (or linking) one object in another.

Contents

eZ publish basics

The internal structure of eZ publish
Content and design
Content management in eZ publish
    A note about object oriented technology
    The content structure
    Datatypes
    The content class
    The content object
    Relation between datatypes, classes a...
    Content object versioning
    Support for multiple languages
    Objects, nodes and the content node tree
    Locations
    Sections
Site management in eZ publish
eZ publish URLs
Summary


Created

02/10/2003
10:27:43 am
by Balazs Halasy

Last updated

20/07/2004
2:34:49 pm
by Frederik Holljen

Authors

Balazs Halasy
Frederik Holljen



This page is part of the eZ Publish documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.