Reusing existing page content
Xperience allows you to build page types with fields that reference other pages. Such fields use the Pages data type and form control.
Content editors can then select existing pages within the given fields on the Content tab of the Pages application, and thus reuse content when modeling pages. Reused pages support workflow, localization, and page-level permissions.
For example, you can create an Article page type that consists of standard fields, such as Header, Text, and Image, as well as an additional Pages field. An article page could then reuse content from other pages, such as an Interesting fact page and an Author page. In this scenario, both Interesting fact and Author are separate pages in the content tree that editors can use to model the content of the article.
The purpose and appearance of the reused content always depends on the website’s implementation, and needs to be handled by the website’s developers. See Displaying reusable content and related pages.
Note
- Reusing pages via this approach serves mainly for modeling of content by editors. If you need to create named, two-sided page relationships between pages, use standard page relationships.
- Changing related pages in fields with the Pages data type is not a versioned operation – pages under workflow immediately reflect such changes in their published version. Individual pages that editors add using the Pages data type can still be affected by workflow.
- On multilingual websites, related pages are shared between all culture versions. For example, if you add pages to a field in an English version of a page, the same pages are also added for all other culture versions.
- Copying pages does not transfer the pages configured within Pages fields. The new copy is considered as a separate page from the original, and editors can define any required relationships manually.
Setting up page types to reuse 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 a New field:
- Data type: Pages
- Form control: Pages
Note
We do not support usage of the Pages data type field in alternative forms for page types.
- Use the Field caption, Field description and Explanation text fields to inform content editors about the intended use of the selected pages. For example:
- Field caption: Interesting Fact and Author
In the advanced Editing control settings section, you can set additional optional settings for the form control. For example:
- Select a Starting path. This allows you to specify the section of the site from which content editors can select pages.
- Choose a Limit of related pages to restrict the number of pages that editors can add to the field.
- Save the changes.
- Ensure that the website’s developers retrieve the reusable content and display it as required on the live site (in the code of the site’s MVC application).
Editors can now use this advanced content modeling technique to reuse content.
Reusing content through linked pages
In addition to page type fields of the Pages type, Xperience websites also provide another alternative way of reusing content – Linked pages. Linked pages represent a reference pointing to another page in the content tree. Such links exist as separate items in the content tree, but do not store any content by themselves. The content is linked to the original page – changes of the original are also reflected in the related linked pages.
The following table compares both approaches:
Pages fields | Linked pages | |
Editing interface | Managed through specific page fields on the Content tab in the Pages application. | Every linked page is a separate item in the site’s content tree, displayed in the Pages application. This helps editors and administrators keep a good overview of how and where content is reused on the website. |
Page URLs | Each reused page only exists once in the content tree, so only has one URL assigned by the system. In many cases, the URL of the reused page is not important and not even part of the utilized content (depends how the content reuse is implemented by the site’s developers). | The original page and all linked pages can have different URLs, for example based on their location in the content tree (when using content tree-based routing). To mitigate duplicate content issues (SEO), we strongly recommend adding Canonical link elements to pages – see Providing canonical URLs for pages. |
Permissions | Page-level permissions (ACLs) can be applied individually to the pages that reuse the content. Depending on the site’s implementation, the logic that loads the reused pages may or may not check their permissions. | Every linked page can have its own configuration of page-level permissions (ACLs). |
Multilingual support | The selection of related/reused pages is shared between all culture versions of the page. | Linked pages are available in the same culture versions as the original page. |
Recommended usage | Modeling scenarios where a page type’s structured fields include snippets of content from other pages. Any scenarios where different URLs are not desirable for occurrences of reused pages. Examples:
| Particularly suitable for page taxonomy (placing pages or products into multiple different categories). General content reusing scenarios where the entire original page is only a content snippet without its own representation on the live site. Example: Adding a product page under multiple different sections of an e-commerce website. |
Content editor resources | For detailed information about editing pages with fields that reuse content, see: | For detailed information about creating linked pages, see: |
Developer resources | To learn how to load and display reusable content from page fields in your site’s code implementation, see: | To work with linked pages in your site’s code, use the same approach as when loading general pages. See: You can filter out linked pages from the loaded data by adding the FilterDuplicates DocumentQuery method. |