Reference configuration example

Note

To configure Sitecore Content Hub, you must either be a superuser or have the necessary permissions granted to you through user group policies.

In this example, you are a superuser for a food blog. You want users to be able to:

  • Link blog posts with the related blog or recipe content.

  • Attribute blogs and recipes to authors and chefs, respectively.

  • Easily find all recipes from a chef and all blog posts from an author.

  • Reuse the authors' and chefs' details to avoid duplicating information.

To achieve this, you:

  • Create two new content types called Author and Chef.

  • Update the Recipe content type to reference at least one chef.

  • Update the Blog content type to reference at least one author and any number of Blog and Recipe content items.

The following diagram illustrates the relations between the different pieces of content: reference content relation diagram

Note

You can check the reference use case to see the end-user's point of view. For search results to include reference content, make sure the user group policy includes Read permission for Portal.Page: Content detail. This example follows the Add a content type procedures.

Create new content types for Author and Chef

  1. On the menu bar, click Manage cog icon.

  2. On the Manage page, click Content types.

  3. On the Types tab, click Add type.

  4. In the New M.ContentType dialog box, fill out the following fields:

    Field name

    Value to enter

    Label

    Author

    Identifier

    M.ContentType.Author

    Prefix

    Author

  5. Select an icon and a color of your choice.

  6. On the Validation rules tab, leave the default condition, and click Save.

  7. Select the Author content type and click Add member.

  8. In the Add member dialog box, click Single-line text.

  9. On the Details tab, fill out the following fields:

    Field name

    Value to enter

    Label

    Name

    Help text

    Name of the author

  10. On the Validation rules tab, select the Make this member required check box.

  11. Click Save.

You can add other members to the newly created content type. To create the new Chef content type, repeat steps 1 to 11.

Add a new Chef member to the Recipe content type

  1. On the menu bar, click Manage cog icon.

  2. On the Manage page, click Content types.

  3. On the Content types page, select the Recipe content type and click Add member.

  4. In the Add member dialog box, click Reference.

  5. On the Details tab, fill out the following fields:

    Field name

    Value to enter

    Name

    Chef

    Label

    Chef

    Help text

    Chef who created the recipe

  6. On the Validation rules tab, restrict the allowed content type to Chef, and set the allowed number of references to At least 1.

  7. Click Save.

Update the Blog content type

Once created, the content type can be updated to accommodate your needs.

  1. On the menu bar, click Manage cog icon.

  2. On the Manage page, click Content types.

  3. Select Blog, and then click Add member.

  4. In the Add member dialog box, click Reference.

  5. On the Details tab, fill out the following fields:

    Field name

    Value to enter

    Name

    References

    Label

    Related content

    Help text

    Related blog post and recipes

  6. On the Validation rules tab, restrict the allowed content types to Blog and Recipe, but do not put any restriction on the allowed number of references.

  7. Click Save.

Do you have some feedback for us?

If you have suggestions for improving this article,