logo
logo

Using references with content

In this example, you are a superuser for a foodies blog. You want the 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:

Note

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

Create new content types for Author and Chef

To create new content types for Author and Chef:

  1. On the menu bar, click Manage .

  2. On the Manage page, click Content types.

  3. On the Types tab, click Add type.

  4. In the New M.ContentType dialog box, on the Details tab, define the following parameters:

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

  6. To add a new Name member to the Author content type, select the Author content type, and click Add member.

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

  8. On the Details tab, set the following parameters:

  9. On the Validation rules tab, to make the Name member mandatory, click the Required switch to make it active, and click Save.

  10. Optionally, you can add other members to the newly created content type.

  11. To create the new Chef content type, repeat steps 1 to 8.

Note

This example follows the Create a content type and Add a member procedures.

Add a new Chef member to the Recipe content type

To add a new Chef member in the Recipe content type:

  1. Select the Recipe content type and click Add member.

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

  3. On the Details tab, set the following parameters:

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

Change the Blog content type

To change the Blog content type:

  1. Repeat steps 1 to 4 of the prevous procedure to create a new Author member in the Blog content type.

  2. To add a new Related content member to the Blog content type, select Blog, and then click Add member.

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

  4. On the Details tab, set the following parameters:

  5. On the Validation rules tab, restrict the allowed content type to Blog and Recipe, but do not put any restriction on the allowed number of references, and click Save:

Can we improve this article ? Provide feedback