A Content Type is a base for new Content items. It defines what Fields will be available in the Content item.
For example, a new Content Type called Article can have Fields such as title, author, body, image, etc. Based on this Content Type, you can create any number of Content items. Content Types are organized into groups.
You can add your own groups here to keep your Content Types in better order.
For a full tutorial, see Create a Content Type or follow user documentation. For a detailed overview of the content model, see Content model overview.
Content Type metadata¶
Each Content Type is characterized by a set of metadata which define the general behavior of its instances:
Name – a user-friendly name that describes the Content Type. This name is used in the interface, but not internally by the system. It can consist of letters, digits, spaces and special characters; the maximum length is 255 characters. (Mandatory.)
Note that even if your Content Type defines a Field intended as a name for the Content item (for example, a title of an article or product name), do not confuse it with this Name, which is a piece of metadata, not a Field.
Identifier – an identifier for internal use in configuration files, templates, PHP code, etc. It must be unique, can only contain lowercase letters, digits and underscores; the maximum length is 50 characters. (Mandatory.)
Description – a detailed description of the Content Type. (Optional.)
Content name pattern – a pattern that defines what name a new Content item based on this Content Type gets. The pattern usually consists of Field identifiers that tell the system which Fields it should use when generating the name of a Content item. Each Field identifier has to be surrounded with angle brackets. Text outside the angle brackets will be included literally. If no pattern is provided, the system will automatically use the first Field. (Optional.)
URL alias name pattern – a pattern which controls how the virtual URLs of the Locations will be generated when Content items are created based on this Content Type. Note that only the last part of the virtual URL is affected. The pattern works in the same way as the Content name pattern. Text outside the angle brackets will be converted using the selected method of URL transformation. If no pattern is provided, the system will automatically use the name of the Content item itself. (Optional.)
Changing URL alias and Content name patterns
If you change the Content name pattern or the URL alias name pattern, existing Content items will not be modified automatically. The new pattern will only be applied after you modify the Content item and save a new version.
The old URL aliases will continue to redirect to the same Content items.
Container – a flag which indicates if Content items based on this Content Type are allowed to have sub-items or not.
This flag was added for convenience and only affects the interface. In other words, it doesn't control any actual low-level logic, it simply controls the way the graphical user interface behaves.
Sort children by default by – rule for sorting sub-items. If the instances of this Content Type can serve as containers, their children will be sorted according to what is selected here.
Sort children by default in order – another rule for sorting sub-items. This decides the sort order for the criterion chosen above.
Make content available even with missing translations – a flag which indicates if Content items of this Content Type should be available even without a corresponding language version. See Content availability.
Aside from the metadata, a Content Type may contain any number of Field definitions (but has to contain at least one). They determine what Fields of what Field Types will be included in all Content items based on this Content Type.
You can assign each Field defined in a Content Type to a group by selecting one of the groups in the Category drop-down. Available groups can be configured in the content repository.
In case of Content Types containing many Field Types you should be aware of possible memory-related issues with publishing/editing.
They are caused by the limitation of how many
$_POST input variables can be accepted.
The easiest way to fix them is by increasing the
max_input_vars value in the
php.ini configuration file.
Note that this solution is not universally recommended and you're proceeding on your own risk.
Setting the limit inappropriately may damage your project or cause other issues. You may also experience performance problems with such large Content Types, in particular when you have many Content items. If you're experincing too many issues, consider rearranging your project to avoid them.
Modifying Content Types¶
A Content Type and its Field definitions can be modified after creation, even if there are already Content items based on it in the system. When a Content Type is modified, each of its instances will be changed as well. If a new Field definition is added to a Content Type, this Field will appear (empty) in every relevant Content item. If a Field definition is deleted from the Content Type, all the corresponding Fields will be removed from Content items of this type.
Removing Content Types¶
System Content Types are by default used for the File Uploads and removing them will cause errors.
If you decide to remove a
image Content Type, or change their identifiers,
you will need to change the configuration, so it reflects the available Content Types.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34