---
title: "Extend content collections"
slug: "extend-content-collections"
abstract: "Example of extending content collections."
---
# Extend content collections

By default, users can only add content items to [content collections](https://doc.sitecore.com/ch/en/users/content-hub/content-collections.html "Content collections"). However, as a *superuser*, you can extend content collections to work with other entity definitions.

> [!note]
> To configure Content Hub, you must either be a superuser or have the necessary permissions granted to you through [user group policies](https://doc.sitecore.com/ch/en/users/content-hub/user-group-policies.html "User group policies").

In this configuration example, you extend content collections to add [products](https://doc.sitecore.com/ch/en/users/content-hub/get-started-with-product-content.html "Get started with product content"), including:

- [Existing products](https://doc.sitecore.com/ch/en/users/content-hub/extend-content-collections.html#UUID-d93d6ca0-0774-e96e-4bcf-d3b2c4178693_N1707905953052)
- [New products](https://doc.sitecore.com/ch/en/users/content-hub/extend-content-collections.html#UUID-d93d6ca0-0774-e96e-4bcf-d3b2c4178693_N1707905970127 "Create a relation")

## Add existing products

To allow adding new products to content collections, you must:

1. Create a relation between content collections and products.
2. Edit the search component of the **Content collection details** page.
3. Edit the creation component of the **Content collection details** page.

## Create a relation

To create a relation between content collections and products, follow the procedure to [add a relation](https://doc.sitecore.com/ch/en/users/content-hub/create-a-member.html "Create a member"). Make sure to enter the following parameters:

| Where | Desired field value |
| --- | --- |
| Page name | **M.ContentCollection** |
| *Name* in **New member group** dialog box | *Product* |
| **New member** dialog box | In **RELATION**, click **Select** and fill in the following fields:<br><br><ul><li>**Name**: *ContentCollectionsToPCM*, for example</li><li>**Associated definition**: *M.PCM.Product*</li><li>**Cardinality**: *ManyToMany*</li></ul> |

When you have done this, click **Save** and **Apply changes**.

## Edit the search component

To allow the **Content search** component to find *M.PCM.Product* entities, you must:

1. Edit the filters to include *M.PCM.Product*.
2. Edit the the [grid](https://doc.sitecore.com/ch/en/users/content-hub/views.html "Views") view to include the desired product fields.
3. Make the same changes to the **Add existing items** component.

## Filters

To edit the filters of the **Content search** component, follow [this procedure](https://doc.sitecore.com/ch/en/users/content-hub/filters.html "Filters"). Make sure to enter the following parameters:

| Where | Desired field value |
| --- | --- |
| Page name | **Content collection details** |
| In **Filters**, on the **System** tab | Change the **combine operator** from *and* to *or* |
| :mdiPlus: **Filter** | Select the *Product (M.PCM.Product)* definition |
| **Fixed** tab | Fill in the following fields:<br><br><ul><li>**Input type**: *Page entity*</li><li>**Filter type**: *Ancestor*</li><li>**Name**: *ContentCollection*</li></ul> |

> [!note]
> The **\*** symbol is a wildcard. It filters dynamic data related to content collections. In this case, it filters the *ContentCollectionsToPCM* and *ContentCollectionToContent* members.

In the final step, change the **Filter type** back to *Relation* and click **Save**.

## Views

To edit the [view](https://doc.sitecore.com/ch/en/users/content-hub/views.html "Views") of the **Content search** component:

1. On the **Content search component** page, in the **Views** section, turn on **Grid**.
2. To edit the product grid view, select the **M.PCM.Product** toggle.
3. To add the desired [fields](https://doc.sitecore.com/ch/en/users/content-hub/configure-how-search-results-display.html "Configure how search results display"), on the **Fields** tab, click :mdiPlus: **Add field**.
4. Click **Save**.

> [!note]
> The [grid view](https://doc.sitecore.com/ch/en/users/content-hub/views.html "Views") is the default view to display content with thumbnails.

## Edit the Add existing items component

Now, make changes to the filters and output of the **Add existing items** component as follows:

1. On the **Content collection details** page, on the **Add existing items** component, click the switch to enable custom settings.
2. Click the **Add existing items** component.
3. In **Filters**, on the **System** tab, change the **combine operator** from *AND* to *OR*.
4. To confirm your change, click **Save**.
5. In the left pane, in the **Views** section, click **Grid** and then click the **M.PCM.Product** block.
6. To add the desired [fields](https://doc.sitecore.com/ch/en/users/content-hub/configure-how-search-results-display.html "Configure how search results display"), on the **Fields** tab, click :mdiPlus: **Add field**.
7. Click **Save**.

## Edit the creation component

To allow the **Creation** component to link existing products to content collections:

1. On the **Content collection details** page, on the **Creation** component, click the switch to enable custom settings.
2. Click the **Creation** component.
3. Click **Link items**, and then click **Add definition**.
4. In the drop-down list, select the *ContentCollectionsToPCM* relation.
5. Click **Save**.
6. Click the **General** section.
7. Add a label, either a *Default* or *Custom* option.
8. In **Linked search component**, select *Content search* and *Add existing items*.
9. Click **Save and close**.

## Add new products

To allow adding new products to content collections:

1. On the menu bar, click **Manage** :mdiCogOutline:.
2. Click **Pages** and find the **Content collection details** page.
3. On the **Creation** component, click the switch to enable custom settings.
4. Click the **Creation** component.
5. Click **New entities**, and then click **Add definition**.
6. In the drop-down list, select *M.PCM.Product*.
7. Fill in the fields as follows:
    - **Label type**: *Default* or *Custom*. Here, you select *Default*.
    - **Detail Page**: here, you select *Product creation* (the template page for the creation of a new product).
    - **Window type**: defines the size of the dialog box used for product creation (*Medium modal* is the default):
8. Under **DEFAULT VALUES**, click **Add value**.
9. In the two drop-down lists, click *ContentCollectionsToPCM*\* and *Current entity* respectively.
10. To confirm your changes, in the bottom-right of the screen, click **Save**.
11. In the top-right of the screen, click **Save** or **Save and close**.

    > [!tip]
    > To remove, edit, or delete products from a content collection, edit the [**Selection component**](https://doc.sitecore.com/ch/en/users/content-hub/selection.html "Selection") to define [operations](https://doc.sitecore.com/ch/en/users/content-hub/operations.html "Operations") for *M.PCM.Product*.