Relating Content

Last Updated: Nov 10, 2021
documentation for the dotCMS Content Management System

To relate two contentlets, a relationship between two Content Types must first be created by a dotCMS Content Architect or Webmaster administering your website. For more information, please see the documentation on Relationships.

If a relationship between Content Types has been established, a Relationships field should appear on the Content when it is being edited.

Relationship fields on content

The Relationships Field allows content publishers to choose “Relate” to search for an existing piece of content to relate, or “Relate New Content” to add a new piece of related content to the one currently being edited. In the example below, choosing “Relate New Content” will allow a new office to be added and simultaneously related to the current employee being edited.

Adding New Content to Relate to an Employee

Make sure to that you have saved changes to the current content being edited before adding a new piece of content to relate, or the changes will be lost. A warning dialog box will appear to remind content publishers to save content before adding new related content.

Warning to save content before adding new related content

After Saving or Publishing the new content that should be related to the prior content, in this case a new Office Location will be added to the system and related to an employee named Brent, then click the Return to:{content name} button to verify that the new content has been both added and related to the original content.

Save and return from related content to originating content

Once you have verified that the Relationship has been added to your content, then you can close the editing window or continue editing the original content.

Verification that the new relationship has been established

To relate and existing piece of content using a relationships field, simply choose the “Relate” option, instead of “Relate new content”, and then use the search filter fields to find the right content to relate, click the checkbox to the right of the contentlet(s) to relate, and finally click on the “Relate” button to add the related content to the content you are editing.

Relate an existing content relationship

On this page

×

We Dig Feedback

Selected excerpt:

×