Module: Content modeling guide
15 of 28 Pages
Use the built-in admin UI form components
Xperience provides different form components for content types that editors will use to input their data. Other form components may also have additional configuration options.
For example, the Long text data type comes with different text-based form components, such as the Text input, Password, URL, or Text area. You can use the Rich text (HTML) data type with the Rich text editor form component for rich text.
Form components also come with various configuration options that provide different editing experiences. Developers can, for example, configure the Rich text form component as Structured content, Email content, or Contact notes. Developers can also customize their configuration. The following image shows Kbank’s Rich text editor configuration options; the last News page editor configuration is custom.
Find out more about available Admin UI form components and the React input type components in the documentation.
Simplify structured content with custom data types
The out-of-the-box data types and UI form components that you use to define editing experience represent the most common types that fit most projects. During content modeling sessions, you may realize you might need to standardize some complex content object, like multiple addresses or office hours, into a predictable structure to improve the editing experience and help with data format predictability to match the unique project’s needs.
Instead of forcing every piece of structured content to live as its own content item (or even a granular content item composed of other, smaller content items) in the Content hub, you can use custom data types to model content that should belong to a parent item without cluttering your reusable content library. This is especially useful for structured content critical for presentation and governance, but it doesn’t make sense to manage it as standalone, reusable content items.
Custom data types mean your content can remain structured, semantically meaningful, and repeatable while avoiding the limitations of hard-coded field sets in your content type. Editors can add, remove, and reorder structured entries (like multiple addresses for a business) without leaving empty fields or copy-pasting data they need to rearrange the content. This provides a smoother, frustration-free editing experience and enables developers to control presentation and validation for each piece of structured content.
See an example of an address custom data type or UTM parameters in the Kentico Community Portal.
Leverage linked content items
Xperience allows editors to compose their content items by combining data stored in several other content items.
Let’s examine the Product content type discussed on the previous page. Highlighted fields store the actual data inputs, while the light violet fields reference other content types that hold the values.
You can see that the Product type contains fields like Product features, Product benefits, or Product image. Sure, you can create two more fields and store the values of product benefits and their icons within the Product. At the same time, why would you?
In real life, if we take the Kbank demo site example, more than one product will offer the same benefits, such as included internet banking, getting a quick decision, or fast access to funds.
Storing the information about benefits within the individual product content item restricts access to this data only within the context of this one (and only one) product item itself. If another product allows for fast access to funds, editors need to duplicate the same wording and decorate it with the same icon in another product item. Duplicating the same content often leads to content management nightmares.
The benefits of creating composable content types that store only references:
- Help with content curation.
- Prevent editors from duplicating the same content.
- Improve content management and long-term content curation.
- Lead to quick content composition.
When defining the content model, discuss which types can be reused and create them accordingly. Editors will use the Content item data type with the Combined content selector form component to refer to the relevant data. At the same time, developers will retrieve the linked items and display them accordingly.
Developers also limit which content types editors can select when creating their content. The Combined content selector allows developers to specify which content types editors select.
When an editor selects content items they want to use, rather than copying the values from the original item to the new item, Xperience creates a reference between these records.
Reusing content items improves content maintenance. When an editor updates the referenced item, the content changes are automatically promoted to every other item that uses this content, making content management a breeze. From the developer’s perspective, developers query the linked items in their custom code and return a collection of references to content items they can further process. For example, they can retrieve URLs of web pages to which editors want to guide their audience.
One of the most typical examples of reusable content types is a content item assets that users store in the Content hub. See further examples mentioned in this material on the Kbank demo site.