---
title: Loading document data
related:
  - https://docs.kentico.com/k8/configuring-kentico/optimizing-website-performance/loading-data-efficiently.md
  - https://docs.kentico.com/k8/developing-websites/loading-and-displaying-data-on-websites/loading-document-data/writing-document-path-expressions.md
  - https://docs.kentico.com/k8/references/kentico-controls/cms-controls/cms-controls-listings-and-viewers.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

The system provides various types of predefined components ([web parts](https://docs.kentico.com/k8/developing-websites/developing-websites-using-the-portal-engine/using-and-configuring-web-parts.md) or controls) that allow you to [load and display data](https://docs.kentico.com/k8/developing-websites/loading-and-displaying-data-on-websites.md) from the documents in your website's content tree.

The most common examples include:

- **Documents data source**, combined with a **Basic repeater**, **Basic datalist** or **Basic universal viewer**
- Listing web parts with built-in document data sources (**Repeater**, **Datalist**, **Grid**, ...)
- Components for displaying documents in a hierarchical structure (**Universal document viewer**, **Hierarchical viewer** — see [Using hierarchical transformations](https://docs.kentico.com/k8/developing-websites/loading-and-displaying-data-on-websites/writing-transformations/using-hierarchical-transformations.md))

When configuring document data sources, fill in the **Path** property to specify which documents to load. See [Writing document path expressions](https://docs.kentico.com/k8/developing-websites/loading-and-displaying-data-on-websites/loading-document-data/writing-document-path-expressions.md) for details.

You can also use the **Content filter** properties to further limit which documents that data source retrieves:

| Web part property                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Sample value                                |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------- |
| Document types                                  | Determines which [document types](https://docs.kentico.com/k8/developing-websites/defining-website-data-structure/document-types.md) to load. Enter a list of document type code names, separated by semicolons (;).<br>You can use the \* wildcard as a substitute for any sequence of characters. For example _Product.\*_ includes the document types _Product.Camera_, _Product.CellPhone_, _Product.Computer_ etc.<br>If you leave the property empty, the data source retrieves all document types.<br>**Note**: If you use an empty value to load all document types, only the general data columns from _View\_CMS\_Tree\_Joined_ are available in the retrieved data. The specific fields of individual document types are not included. Keep this fact in mind when writing [transformations](https://docs.kentico.com/k8/developing-websites/loading-and-displaying-data-on-websites/writing-transformations.md), WHERE conditions, ORDER BY expressions, or otherwise using columns. | cms.menuitem;cms.article;cms.news           |
| Category name                                   | Allows you to load only documents that belong to the selected [categories](https://docs.kentico.com/k8/managing-website-content/working-with-documents-and-pages/categorizing-documents.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |                                             |
| Combine with default culture                    | Indicates if the data source loads the default [language version](https://docs.kentico.com/k8/multilingual-websites/editing-the-content-of-multilingual-websites.md) for documents that are not available in the language selected by the current user.<br>You can choose between **Yes** and **No**, or use the website-level settings (**Settings -> Content -> Combine with default culture**).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |                                             |
| Culture code                                    | Determines which culture version of the specified documents the data source loads. Leave the property empty to automatically use the language selected by the current user.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | en-us                                       |
| Maximum nesting level                           | Specifies the maximum number of content tree sub-levels from which the data source loads content. The number is relative, i.e. counted from the beginning of the specified document path.<br>The value -1 loads documents from all sub-levels.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |                                             |
| ORDER BY expression                             | Sets the value of the ORDER BY clause in the SELECT statement used to retrieve the content.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | ProductName ASC, ProductPrice DESC          |
| Select only published                           | Indicated whether the data source only loads published documents (based on [workflow and content scheduling](https://docs.kentico.com/k8/managing-website-content/working-with-documents-and-pages/using-workflows.md)).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |                                             |
| Select top N documents                          | Specifies the maximum amount of documents to load. If empty, the data source loads all possible documents.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                             |
| Site name                                       | Specifies the site from which the documents are loaded. If you leave the value empty, the data source retrieves content from the current website.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | CorporateSite                               |
| WHERE condition                                 | Sets the value of the WHERE clause in the SELECT statement used to retrieve the content.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | ProductPrice > 100 AND ProductColor='green' |
| Filter out duplicate documents                  | If checked, the data source filters out duplicate links to the same document (see [creating linked documents](https://docs.kentico.com/k8/managing-website-content/working-with-documents-and-pages/copying-and-moving-documents-creating-linked-documents.md) for details).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |                                             |
| Check permissions<br>(System settings category) | Indicates whether the data source checks the permissions of the users viewing the content. If enabled, only documents for which the user has the **Read** permission are loaded (for secured documents).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |                                             |

> **Note:** **Important**
>
> We recommend that you carefully consider the performance aspects of components that load data. Fill in the **Columns** property and set up caching.
>
> For more information, see:
>
> - [Loading data efficiently](https://docs.kentico.com/k8/configuring-kentico/optimizing-website-performance/loading-data-efficiently.md)
> - [Caching the data of page components](https://docs.kentico.com/k8/configuring-kentico/optimizing-website-performance/configuring-caching/caching-the-data-of-page-components.md)

> **Tip:** **Tip**: You can also allow users to dynamically choose which data is displayed on the live site. See [Filtering and paging data](https://docs.kentico.com/k8/developing-websites/loading-and-displaying-data-on-websites/filtering-and-paging-data.md).
