July 22, 2021

Page Designer pages can be part of the search result just like content assets, however there are some details to take into consideration.

The main points to follow can be found in the documentation here and here.

Code Updates

When adding the setFilteredByFolder(false) into your code, you usually want to add it on the dw.suggest.SuggestModel as well as the dw.content.ContentSearchModel.

When extending the page / component meta definition JSON, make sure to add the json exactly as given in the documentation - only the "sortable" field could (and should) be omitted, in case it’s a PD component.

1
2
3
4
5
6
7
8
9
10
11
{
  "id": "heading",
  "name": "Banner Heading",
  "required": true,
  "type": "text",
  "searching": {
    "searchable": true,
    "refinable": false,
    "boost_factor": 2.0
  }
}

Business Manager updates

Now you can perform the required updates in the business manager:

  • make the page searchable and add keywords (see image below)

  • set the text of the newly searchable attribute

  • rebuild the search index

updating the search setting of the PD site

And finally the page should appear in your content search results!

Contact