Link authors to articles
Create relationships between articles and their authors to show who wrote what. The easiest way to do this is by modeling your articles and authors as separate content types.After a few setup steps, you use a dedicated linked items element to link authors to articles they wrote and create a relationship between the authors and their articles.
Tip: Check how linking authors to articles works in practice in our multi-site sample project.
1. Prepare the content model
Before you can link authors to their articles, you need to:- Create a content type for authors.
- Add a linked items element to the content type for articles.
Create a content type for authors
Create a new content type, name it Author, and add elements for whatever information you want to keep in authors’ profiles. Most likely, their name, photo, short bio, and possibly a social media profile link.- Use text elements for the author’s name and social media link.
- Use an asset element for the author’s profile photo.
- Use a rich text element for the author’s bio.
Adjust the content type for articles
Secondly, make space for authors in your articles: add a linked items element to the article content type to enable adding authors as linked items.Best practices
- Limit the element to only accept items of the Author type. This helps to prevent mistakes like linking another article instead of an author.
- Make the element required so that your content creators don’t forget to add authors to articles.
2. Create content items for authors
Once you have the content model ready, create the authors’ content items. Each author is a separate content item. For clarity, we suggest using authors’ names to name their respective content items.3. Add authors to articles
The last step is to link authors to articles:
- In Content & assets, open an article for editing.
- Go to the linked items element for authors.
- Select an appropriate content item representing the author of the article.
Sign in with your Kontent.ai credentials or sign up for free to unlock the full lesson, track your progress, and access exclusive expert insights and tips!