Is this really the version you are looking for? Kentico 9 documentation is no longer updated. Use the switch in the header to choose your Kentico version.

Loading page data

The system provides various types of predefined components (web parts or controls) that allow you to load and display data from the pages in your website's content tree.

The most common examples include:

  • Pages data source, combined with a Basic repeater, Basic datalist or Basic universal viewer
  • Listing web parts with built-in page data sources (Repeater, Datalist, Grid, ...)
  • Components for displaying pages in a hierarchical structure (Universal page viewer, Hierarchical viewer — see Using hierarchical transformations)

When configuring page data sources, fill in the Path property to specify which pages to load. See Writing page path expressions for details.

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

Web part property

Description

Sample value

Page types
___________________________

Determines which page types to load. Enter a list of page type code names, separated by semicolons (;).

You can use the * wildcard as a substitute for any sequence of characters. For example Product.* includes the page types Product.Camera, Product.CellPhone, Product.Computer etc.

If you leave the property empty, the data source retrieves all page types.

Note: If you use an empty value to load all page types, only the general data columns from View_CMS_Tree_Joined and the COM_SKU table (for product pages) are available in the retrieved data. The specific fields of individual page types (coupled data) are not included. Keep this fact in mind when writing transformations, WHERE conditions, ORDER BY expressions, or otherwise using columns.

cms.menuitem;cms.article;cms.news

Category name Allows you to load only pages that belong to the selected categories.  

Combine with default culture

Indicates if the data source loads the default language version for pages that are not available in the language selected by the current user.

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 pages 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 page path.

The value -1 loads pages from all sub-levels.

 

ORDER BY expression

Sets the value of the ORDER BY clause in the SELECT statement used to retrieve the content.

Note: Users without the Administrator privilege level or the Edit SQL code permission for the Design module are only allowed to write the following types of SQL syntax:

  • one or more column names (separated by commas)
  • the ASC and DESC keywords

ProductName ASC, ProductPrice DESC

Select only published

Indicated whether the data source only loads published pages (based on workflow and content scheduling).

 

Select top N pages Specifies the maximum amount of pages to load. If empty, the data source loads all possible pages.  

Site name

Specifies the site from which the pages 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.

Note: Users without the Administrator privilege level or the Edit SQL code permission for the Design module are only allowed to write the following types of SQL syntax:

  • column names, values and basic operators: =, !=, >, <
  • AND & OR operators, parentheses
  • column BETWEEN value AND value
  • column LIKE value
  • column IN (values)
  • column IS NULL
  • NOT keyword for the above expressions (NOT BETWEEN, NOT LIKE, NOT IN, IS NOT NULL)

ProductPrice > 100 AND ProductColor='green'

Filter out duplicate pages

If checked, the data source filters out duplicate links to the same page (see creating linked pages for details).

 

Check permissions
(System settings category)

Indicates whether the data source checks the permissions of the users viewing the content. If enabled, only pages for which the user has the Read permission are loaded (for secured pages).  

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:

Tip: You can also allow users to dynamically choose which data is displayed on the live site. See Filtering and paging data.