---
title: "Example - Use in relation editor"
slug: "example---use-in-relation-editor"
abstract: "Example of how to use a Search component as a filter in another component."
---
# Example - Use in relation editor

> [!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").

This example shows how the **Use in relation editor** feature can be used with [campaigns](https://doc.sitecore.com/ch/en/users/content-hub/campaigns.html "Campaigns") to ensure that only content with the *Blog* content type can be selected.

![Blog post example](https://doc.sitecore.com/api/markdown-image/ch/en/users/content-hub/images/blog_post_example.png)

> [!note]
> **Before you begin**
> -   [Add a **Search** component](https://doc.sitecore.com/ch/en/users/content-hub/add,-modify,-or-delete-page-components.html "Add, modify, or delete page components") to the page. In this example, the component was added to the **Campaign create** page.

## Configure the Search component

To configure the **Search** component:

1. On the menu bar, click **Manage** :mdiCogOutline:.
2. On the **Manage** page, click **Pages**.
3. On the **Pages** page, select the page you want to modify.
4. On the **Layout** tab, click the **Search** component to open its details page.
5. In the left pane, in the **General** section, click **Functionality**, then in the **Usage** toggle, select **Relation editor**.
6. In the left pane, in the **General** section, click **Filters**.
7. On the **System** tab, click :mdiPlus: **Filter**, select the *Definition* filter type and, from the **Definition** list, select *Content (M.Content)*, and click **Save**.
8. Click :mdiPlus: **Filter**, select the *Relation* filter type, from the **Definition** list, *Content type (M.ContentType)*, from the **Field** list, select *ContentTypeToContent*, and from the **Operator** list, select **equals**.
9. Click :mdiPlus: **Content type** and, in the **Content type** dialog box, select the toggle next to **Blog**, and click **Save**.
10. Click **Save**. The **System** tab now looks like this:

    ![Search filters](https://doc.sitecore.com/api/markdown-image/ch/en/users/content-hub/images/search_filters.png)

    By default, an *AND* operator is applied to filter conditions.

11. Click **Save and close**.

> [!note]
> For more information about **Search** component filters, see [Filters](https://doc.sitecore.com/ch/en/users/content-hub/filters.html "Filters").

## Change the search configuration

To add a **Content** section to the **Campaign** dialog box with the ability to add content, you need to modify the search configuration.

To change the search configuration:

1. On the **Campaign create** page, in the **MAIN ZONE**, add an **Entity details** component, and then click it to open its details page.
2. On the **Members** tab, turn on the **General** tab and, in the **Visible members** section, turn on the **Content** switch, and click :mdiCogOutline: next to it.
3. In the **Content** dialog, click the **Functionality** tab.
4. Next to **Search configuration**, click :mdiPlus: **Add** and, in the **Portal page component** dialog box, select the check box next to **Search**, and click **Save**.
5. Click **OK** to close the **Content** dialog.
6. Click **Save and close**.