Skip navigation

Link authors to content

If your project has articles from various authors, you'll probably want to create relationships between the articles and their authors to show who wrote what. The easiest way to do that is by creating authors and articles as separate content types and using linked items to create the relationships.
In this tutorial, you'll see how to create a content type for your authors, create an author, and link that author to a given article. Once you have everything ready in your Kentico Kontent project, you can retrieve the relationships within your own app.

Table of contents

    Assume you have a Simple Article content type for your articles defined and at least one article created. Now you just need to create an Author content type and then add a place to link authors inside articles.

    Creating a content type for your authors

    First, you need to define what your author model will look like, which you can do by creating a new content type.

    1. In Kentico Kontent, choose  from the app menu.
    2. Click Create new.
    3. Enter a name for your content type, such as Author.
    4. Add at least two elements:
      • Name Text element
      • Bio Rich text element
    5. Save your content type.
    A screenshot of an Author content type already set up.
    1. In Kentico Kontent, choose from the app menu.
    2. Click the Simple Article content type.
    3. Add a Linked items element.
    4. Label it Author.
    5. (Optional) Click , limit the allowed content types to Author, and make the element required.
    A screenshot of an author element added to a content type.

    Creating and linking an author

    To link an author to an article, we first have to create an author – in this example Jane Doe for the article "The Origin of Coffee". You can create an author separately (as you would create any content item) or create it directly from within an article, as in this example.

    1. In Kentico Kontent, choose  from the app menu.
    2. Open one of your articles.
    3. If your article is published, click Create new version so you can edit the article.
    4. In the Author element, click Create new Author (this is shown if you have limited the Linked items element to allow only the Author content type – otherwise, you see "Create new item").
    5. Enter a name for your content item, such as the author's first name.
    6. Enter the author's name into the Name element.
    7. Enter a bio into the Bio element.
    8. Publish your author.
    9. Click to go back to your article.
    10. Publish the new version of your article.

    Now you have an article with an author assigned as a linked item. So we can see that Jane Doe is connected to The Origin of Coffee.

    A screenshot of an author inside an article.

    What's next?

    In this tutorial, you created a content type for your authors, created an author, and linked your author to an article. Now that you've linked items inside Kentico Kontent, you can retrieve the relationship in your app.