Working with Content Types
Content Types define the fields to capture from input forms, and functionality to validate, display and utilize their information. They can model any type of content you want to manage.
For example, a content type named MyContact might define the fields: Name, Email, Phone and Photo.
The MyContact content type might also define functionality to send the contact a message to the email address in the email field.
Once a content type is created, any number of content records that share the content type's fields and functionality can be created and managed in Content Manager and other webCOMAND Apps.
Create a Content Type
It is easy to create a content type:
- Select a folder in Tree View.
- Click New in the Collection Bar in the right Panel.
- Select Content Type from the drop-down list.
Your new Content Type will be created and displayed in the Content Type Editor.
Edit Type
The Edit Type sidebar contains key information about a content type.
Title
The name for the content type, as it will appear throughout webCOMAND.
Description
A description for the content type, to explain how it will be used in a sentance.
Icon
An icon that will represent the content type and content of the type, when an item-specific icon is not available.
Help
More detailed information about the purpose of the content type and how it is to be used.
Advanced
In addition to the key information above, more advanced options are also available.
Extends
Each content type must extend another to determine a base set of fields and functionality. By default all content types extend the Content content type, which provides ID, OID and UUID fields, and version control functionality. This default is sufficient for most content types, but another content type can be selected for a different base set of shared fields and functionality. For MyContact, it can be left as-is.
Identifier
A unique name for this content type, which will be used to identify and reference it throughout the system. It should start with a letter, followed by only letters, numbers and underscores. For example, "MyContact".
Implements
Content Types may "implement" other content types to formally share the same fields and functionality. This is similar to extends, except multiple other content types can be selected. Implements is not required though, and is typically only used in more advanced situations.
Fields
Fields define content data (ie. text, numbers, files), relationships (ie. sub-content, related content, lists) and layout (ie. headings, groups, tabs). To create a new field, click the New button to the right of the Fields label.
Fields have many options, but only a few typically need to be set or changed from their defaults.
Field Identifier
Similar to the Content Type Identifier, the field identifier is the unique name for this field within the content type. It should also start with a letter, followed by only letters, numbers and underscores. For example, "Name".
Field Type
The field type typically defines what type of information should be input and stored for this field. It will default to "Text Line", which is used to store a single line of text. This can be left as-is for the example Name, Email and Phone fields, but should be changed to Image Data for the Photo field.
Unique/Key
Most content types will contain one field that will serve as the Unique/Key field. That means it will be used to uniquely identify each content record of this content type. Our example Name field is perfect candidate, because each contact's name will be unique. If two contacts do have the same name, we will need to add something to make them unique, if the Unique/Key field is checked, because two contacts with an identical name will not be allowed. If Unique/Key is not checked for any content type field, the OID field will be used. The OID (aka Object ID) is a unique number automatically assigned to each content record.
Display
Check this field to display the field value of a content record in List, Grid and Tree views, as well as in the Panel Title Bars. This makes sense for the name field, but should not be checked for the others in our example.
That's it for the Name field, so click New (+) on the right of the grey toolbar above to create the next Phone, Email and Photo fields. Once those are added, click Approve in the Toolbar to update the new content type with our Identifier and fields.
You can learn more about all of the other content type and field options by clicking the help icon for each field, or see Developer Guide: Content Types.