Scenarios

This section of the documentation provides some scenario-based recipes for building solutions with the PnP Modern Search Web Parts. It can be confusing to look across the documentation for ways to solve specific needs, so these scenarios may help. Wherever possible, we link back to the core documentation rather than explaining actions in duplicate.

Scenario 1

Create a simple search page

We can create a search-driven experience simply by adding the PmP Modern Search Web Parts to a page: PnP Search Box and PnP Search Results.

Scenario 2

Set up Managed Properties

In order to use your custom column values as filters in your PnP Modern Search search solutions, those columns must be Site Columns (usually included in Content Types) and they must be mapped to Managed Properties.

Scenario 3

Build a page with filters

Most search solutions require some filters (aka refiners) to allow the user to filter the initial results.

Scenario 4

Scenario Create your first custom template

Create your first custom template

Scenario 5

Store custom templates in SharePoint

Storing custom templates as files in a SharePoint site, is great when you want to use them across sites and want some control.

Scenario 6

Edit custom templates in SharePoint

Storing custom templates as files in a SharePoint site, is great when you want to use them across sites and want some control.

Scenario 7

Edit custom templates locally in Visual Studio Code

When you have your templates in SharePoint, it is easy to setup a way to edit locally on your computer and still get the result in SharePoint almost instantly.


More to come!