Xperience offers multiple ways to store and organize your website's content. This page describes each approach in detail and lists their advantages and disadvantages. See the Content modeling guide for an exhaustive introduction to modeling and structuring content in Xperience.
You can store content:
As pages – using a hierarchical structure visualized as the content tree of the Pages application.
In module classes – suitable for storing large amounts of data and custom module related data.
In custom tables – suitable for storing large amounts of data in a flat structure.
In media libraries – suitable for storing large files, not exclusively of media character, such as videos, high resolution images or packaged files.
Use pages as a content storage when you need:
Pages are stored in a content tree. Depending on the implementation of the website, specific parts of the content tree can also define and reflect the site's navigation and overall site map structure. The system can also be configured to generate URLs for pages (routes) based on the structure of the content tree.
When you plan on storing and creating a large number of pages, consider structuring the content tree into smaller segments. This can help you avoid reaching the recommended limit of 1000 child pages under a single page. For example, articles can be structured based on the day they were created on.
If you plan on segmenting an even larger amount of content, you can structure the content tree even further. However, keep in mind that the Alias path for each item in the content tree cannot exceed 450 characters in length.
Note: While this approach helps you structure content so that you do not exceed the recommended 1000 child pages limitation, the total number of pages in the system will increase. Consider the recommended maximum number of total pages in the system.
Optimizing performance for large sites
See Optimizing performance of MVC sites for information on improving website performance. One approach for reducing the amount of pages in the content tree is setting up archival for outdated pages.
While all items in the content tree of the Pages application are pages, there are several kinds of pages that you can distinguish:
If you need help when deciding between page builder and structured pages, visit Choosing the format of page content to learn how to choose the more suitable approach.
Custom module classes allow you to store large amounts of content without the hierarchy provided by the pages. Use module classes when you need to:
Scenario
One specific scenario in which you can utilize module classes as a content storage is for page archival. That is, storing outdated pages that you do not need to display on the live site anymore. You are still able to access the page data but you do not have to clutter the content tree with unnecessary items.
Limitations of using module classes for storing content
Please be aware of the following limitations when deciding whether to use modules for storing content:
Custom tables allow you to store large amounts of content without the hierarchy provided by pages. Use custom tables when you need to:
Limitations of using custom tables for storing content
Custom tables also pose certain limitations. Consider using custom tables for storing content if you do not need to:
Pages | Module classes | Custom tables | |
|---|---|---|---|
Can hold traditional data types (int, float, ...) | |||
Can hold binary stream data (files) | |||
Can hold one-to-many data (radio buttons, drop-down lists) | |||
Can be used as an E-commerce product | |||
Workflow | |||
Versioning | |||
Multilingual content | * | * | |
Hierarchical data structure | |||
Each record has its own URL | |||
Data can be accessed using the API | |||
Importable / Exportable | |||
Performance | |||
Recommended for large data sets when using flat data structure | |||
Number of database tables that store the data | 3+ | 1 | 1 |
Recommended for large binary data | |||
Binary data can be stored in the file system | |||
*You can only translate data using localization macros.
Media libraries are designed to store large files – not exclusively of media character – such as videos, high-res images or packaged files. You can access media library files without overhead as there is no need to query the database to access them.
Pages | Media libraries | |
|---|---|---|
Recommended for large binary data | ||
Direct access to the data without querying the database | ||
Number of database tables that store the data | 3+ | 2 |
Binary data can be stored in the file system |