Overview

Skill Level: Any

Prerequisites

To search for content for pages that are created with other page types, you must customize the source files for the site as follows. You can download the source files from WCH Site application.

For more information about Watson Content Hub and all the available Watson Content Hub developer tutorials, click here.

Step-by-step

  1. Define the type of pages to list in the search results

    In the \src\app\Constants.ts file, the Design Pages is defined as the type of pages to list in search results by default.

    static readonly PAGE_TYPES_SEARCHED = ['Design Page'];

    Include the page type that you want to search to list in the search results. For example, to enable search in the site pages that are created from Standard page type make the following change.

    static readonly PAGE_TYPES_SEARCHED = ['Design Page','Standard Page'];

    To enable search for site pages that are created from ANY page type, change the type of pages to list in search results as follows.

    static readonly PAGE_TYPES_SEARCHED = [];

Expected outcome

For more information about Watson Content Hub and all the available Watson Content Hub developer tutorials, click here.

Join The Discussion

Your email address will not be published. Required fields are marked *