Linked items elements enable you to link content together in your project. In this example, you will learn how to link articles about a similar topic. This scenario can be also adjusted to your liking, for example, to feature related products on an e-commerce site.
Note: The following steps may differ depending on whether you have already created your content types and content items or not. If you're just starting with the project, learn how to create a new content type first.
Preparing the content type
To add the Linked items element to an existing content type, in this case, the Article, follow these steps:
- From the app menu, choose Content models.
- Open the Article content type for editing.
- Drag & drop the Linked items element. Tip: You can also add the element by clicking.
- Type a name of the Linked items element. For example, you can label it Related articles.
- Click the Show configuration icon and limit the element to the Article content type.
- Click Save.
Now that you added the Linked items element to the content type, you can go back to Content & Assets and open a specific article you want to link with the related content.
Linking content together
To link related articles to an existing article in the project, in this case, the Coffee processing techniques article, follow these steps:
- From the app menu, choose Content & Assets.
- Open the Coffee processing techniques article for editing.
- Choose either Add existing items to add an existing content item or Create new to create a new content item.
After adding linked items to the element, you can reorder, remove, or expand the items to open them for the view. To edit a specific content item, click Edit to open the content item for editing.
The linked content items are independent and can be accessed outside the content items they are used in. This means you only need to edit a specific linked item once and the changes will automatically reflect everywhere.
In the picture, you can see how the final result can look like on the website.
Making changes to published content
Once the Coffee processing techniques article is published, you cannot make any changes. To add new related content to the Linked items element or update the content item itself, you first need to create a new version of the item or unpublish the item.