All Content Types in dotCMS are created from Base Content Types. There are nine different Base Content Types in dotCMS. All custom Content Types you create must be created from one of the Base Content Types, and each custom Content Type inherits all the fields contained in the Base Type (as well as any custom fields you add to your Content Type).
The Base Content Types
You can identify the Base Content Type of an existing Content Type by viewing the Type field in the Content Type Properties tab.
Common Base Types: Content, Page, Widget, and Form
|Used to create standard Content Types that do not represent any pre-defined type of content, and do not contain any pre-defined system fields.|
|Allows you to create different Content Types for different types of Pages on your site.|
|Used to create a Widget Content Type, which allows you to create a number of different Widgets (instances of the Widget Content Type) which all share the same core code, but differ in the values of specific parameters that you create in the Widget Content Type.|
|Used to build reusable, dynamic forms within dotCMS to embed on any page.|
File Base Types: Asset and File
There are two different Base Types that you can use to upload and manage files. The Asset Base Type allows you to create files which exist within the dotCMS content store, but which do not have a normal URL path. The File Base Type allows you to create files which have a specific location within the dotCMS site and folder tree, and which can be accessed with a URL that references the file's location in the file tree.
|Allows you to create files and images which are stored within dotCMS, but which do not have a standard URL path to them based on the file and folder tree in the Site Browser.|
|Allows you to create new file types which allow content contributors to upload files of particular types (or files used for particular purposes) to specific locations on your site.|
Special Purpose Base Types: Key/Value, Persona, and Vanity URL
The following Base Types have custom behavior which allows you to create multiple different Content Types which take advantage of important dotCMS features, such as Vanity URLs and Personalization.
Key / Value
|Allows you to create different Content Types which associate specific values to specific keys.|
|Allows you to create new Persona Content Types for different classes of users that use your site.|
|Allows you to create multiple Vanity URL Content Types, with additional fields that extend Vanity URLs.|
The Host Content Type
In addition to the nine Base Content Types described above, there is also a Host Content Type, which is used to store information on all the sites hosted on your dotCMS instance. But unlike the Base Content Types above, you can not create your own custom Content Type from the Host Content Type. However you can extend the Host Content Type by adding any fields you wish to it; this allows you to add information which your users can (or must) supply for each site hosted on your dotCMS instance.
For example, you may wish to change or add fields that represent developer keys for differetn Web APIs used by your sites (such as Google Analytics). You can then write a single Widget or other code block that can appropriately access Web APIs on all your sites, but pull the appropriate developer key based on the site the code is run on.
Custom “Base” Content Types
Since version 22.05, dotCMS has included the ability to copy a Content Type. In practice, this means that user-created Content Types can function similarly to a Base Content Type, as one can act as a template or prototype for another.
See the page on Copying a Content Type for more information.
Content Type Fields
Content can be thought of very much like a data in a database. Each Content Type can be thought of as similar to a table in a database, where the fields of the Content Type represent the columns of the table and each individual content item represents a row in the table.
The fields in a Content Type (e.g. “columns” in the “table”) of each Content Type are comprised of the Standard Field Types, the WYSIWYG Field, Tag and Category Fields, etc. Nearly all fields can be made searchable, and can be accessed via the RESTful APIs. For more information, please see the Content Type Fields documentation section.
Each Base Content Type contains a number of system fields, which are fields that exist in all content types of the same Base Type. When you create a new custom Content Type, you may add new fields and you may change the values of the system fields, but you may not remove the system fields that come from the Base Type.
Most system fields are intended for your content contributors to fill in; these represent information which is required for all content of a given Base Type (such as the “Host or Folder” and “Show on Menu” fields for the File Base Type, or the “Title” and “URL” fields for the Page Base Type). However some Base Content Types contain system fields which are intended only for your web developers to edit (such as the “Code” field on the Widget Base Type).
Which system fields are available to your content contributors depends on the Base Content Type and the system field, however:
- You can identify the system fields in any Content Type by viewing the Action column in the Content Type Fields tab.
- Any field which can not be removed (i.e. any field which does not have a red X in the Action column) is a system field which is part of the Base Content Type.
- You can identify which system fields are available for your content contributors to edit by viewing the Content editing screen for an individual Content item of the given Content Type.
- Any system field which is visible and editable in the Content editing screen is available (and intended) for your content contributors to edit.
- Any system field which is not visible in the Content editing screen is intended for your web developers to edit.
- Any system field which is visible in the Content editing screen but not editable is not intended for either your web developers or content contributors to edit; these fields are automatically filled in by dotCMS based on the values entered in other system fields.