Advanced content modeling
You can use Kentico’s content only page types to build an advanced content model. This allows editors to work with shared content (reuse pages) when modeling pages. Individual pages also support workflow, localization and page-level permissions.
Kentico allows you to define a Pages field on individual page types. Using the Pages field, you can let content editors know that you expect them to reuse different pages when modeling an individual page.
For example, you can create an Article page type that consists of standard fields: Header, Text, and Image. In addition to that, the article will consist of an Interesting fact page and an Author page. Both Interesting fact and Authorare just pages that editors can use to create the content of this page.
This approach serves mainly for modeling content by editors. If you need to create named, two-sided page relationships between pages, use standard page relationships.
Modeling content by adding different pages in the Pages field is not a versioned operation. Changing the model of a page under a workflow immediately reflects the changes on the published version of the page. The individual pages that editors add using the Pages can still be affected by a workflow.
Setting up content for modeling with related pages
To allow editors to reuse pages, add the Pages form control to a page type:
- In the Page types application, Edit a page type.
- On the Fields tab, add New field:
- Data type - Pages
- Form control - Pages
- Use the Field caption, Field description and Explanation text fields to inform content editors how you intend them to use the field. For example:
- Field caption - Interesting Fact and Author
- (Optional) Select a Starting path. This allows you to specify the section of the site from which editors are able to select pages.
- Save.
Editors can now use this advanced content modeling technique to reuse content on the Form tab.
Developers can display the content on the live site:
- By accessing the data via generated code. For example in MVC views.
- Using listing web parts. The Relationship name is in the Page type (field name) format.