How to set up your first PnP Search Page

Published Jul 27 2021 08:22 AM 1,443 Views

After deploying PnP Modern Search to your tenant, it’s time to create the first PnP search page.

 

PnP search pages can be added to any modern site, so it’s your decision where to do this. My recommendation is always try this out on a “playground” site first, before deploying to production.

1 – Create an empty page

The first step is to create an empty page, where you’ll add the PnP web parts. Go to any of your modern sites, and create a new page:

 

pnp-modern-search-page-01-new-page-1024x412

 

 

2 – Add the PnP web parts

The next step is to add the PnP web parts to your page. The package, that you’ve deployed, adds the following web parts available on your modern pages:

 

pnp-modern-search-page-02-web-parts

 

You can get to these web parts when search for “PnP” or “search” in the web part gallery:

  1. PnP Search Box
  2. PnP Search Results
  3. PnP Search Filters
  4. PnP Search Verticals

 

pnp-modern-search-page-03-web-parts-example-1024x686

 

On a very simple search page, we have at least two web parts: a search box and a search results web part.

Search Box Web Part

You simply add a Search Box to the page by choosing “PnP Search Box” web part. At this point, you don’t have to do any further configuration.

 

pnp-modern-search-page-04-search-box-web-part

 

Search Results Web Part

The next step is to add a “PnP Search Results” web part to the page.

Once the web part is added to the page, you have to connect it to the Search Box web part, to receive the query from there. You can do this by following these steps:

  1. Edit the page.
  2. Edit the properties of the Search Results web part.
  3. Switch to page “3 of 4” on the web part properties.
  4. Turn on “Use input query text”.
  5. Select “Dynamic value” in the radio button list.
  6. Select “PnP – Search Box” in the “Connect to source” dropdown.
  7. Select “Search query” in the “PnP – Search Box’s properties” dropdown.

 

pnp-modern-search-page-05-search-results-web-part-properties

 

Once done, save the page and enjoy your very first search page!

 

pnp-modern-search-page-06-search-page-101

 

This article was originally posted on Search Explained Blog.

%3CLINGO-SUB%20id%3D%22lingo-sub-2591265%22%20slang%3D%22en-US%22%3EHow%20to%20set%20up%20your%20first%20PnP%20Search%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2591265%22%20slang%3D%22en-US%22%3E%3CP%3EAfter%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fsearchexplained.com%2Fdeploy-pnp-modern-search-web-parts-sharepoint-online%2F%22%20target%3D%22_blank%22%20rel%3D%22noreferrer%20noopener%20nofollow%22%3Edeploying%20PnP%20Modern%20Search%20to%20your%20tenant%3C%2FA%3E%2C%20it%E2%80%99s%20time%20to%20create%20the%20first%20PnP%20search%20page.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CBLOCKQUOTE%20class%3D%22wp-block-quote%22%3E%0A%3CP%3EPnP%20search%20pages%20can%20be%20added%20to%20any%20modern%20site%2C%20so%20it%E2%80%99s%20your%20decision%20where%20to%20do%20this.%20My%20recommendation%20is%20always%20try%20this%20out%20on%20a%20%E2%80%9Cplayground%E2%80%9D%20site%20first%2C%20before%20deploying%20to%20production.%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CH2%20id%3D%22toc-hId--406102506%22%20id%3D%22toc-hId--406098660%22%3E%3CSPAN%3E1%20%E2%80%93%20Create%20an%20empty%20page%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3EThe%20first%20step%20is%20to%20create%20an%20empty%20page%2C%20where%20you%E2%80%99ll%20add%20the%20PnP%20web%20parts.%20Go%20to%20any%20of%20your%20modern%20sites%2C%20and%20create%20a%20new%20page%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22pnp-modern-search-page-01-new-page-1024x412%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F298687iF74A57C4A3372019%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pnp-modern-search-page-01-new-page-1024x412%22%20alt%3D%22pnp-modern-search-page-01-new-page-1024x412%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-2081410327%22%20id%3D%22toc-hId-2081414173%22%3E%3CSPAN%3E2%20%E2%80%93%20Add%20the%20PnP%20web%20parts%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3EThe%20next%20step%20is%20to%20add%20the%20PnP%20web%20parts%20to%20your%20page.%20The%20package%2C%20that%20you%E2%80%99ve%20deployed%2C%20adds%20the%20following%20web%20parts%20available%20on%20your%20modern%20pages%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22pnp-modern-search-page-02-web-parts%22%20style%3D%22width%3A%20306px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F298688iA6AAE54F025A1AD5%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22pnp-modern-search-page-02-web-parts%22%20alt%3D%22pnp-modern-search-page-02-web-parts%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20get%20to%20these%20web%20parts%20when%20search%20for%20%E2%80%9CPnP%E2%80%9D%20or%20%E2%80%9Csearch%E2%80%9D%20in%20the%20web%20part%20gallery%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EPnP%20Search%20Box%3C%2FLI%3E%0A%3CLI%3EPnP%20Search%20Results%3C%2FLI%3E%0A%3CLI%3EPnP%20Search%20Filters%3C%2FLI%3E%0A%3CLI%3EPnP%20Search%20Verticals%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22pnp-modern-search-page-03-web-parts-example-1024x686%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F298689i03C4AF25769623B8%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pnp-modern-search-page-03-web-parts-example-1024x686%22%20alt%3D%22pnp-modern-search-page-03-web-parts-example-1024x686%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOn%20a%20very%20simple%20search%20page%2C%20we%20have%20at%20least%20two%20web%20parts%3A%20a%20search%20box%20and%20a%20search%20results%20web%20part.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1522995495%22%20id%3D%22toc-hId--1522991649%22%3ESearch%20Box%20Web%20Part%3C%2FH3%3E%0A%3CP%3EYou%20simply%20add%20a%20Search%20Box%20to%20the%20page%20by%20choosing%20%E2%80%9CPnP%20Search%20Box%E2%80%9D%20web%20part.%20At%20this%20point%2C%20you%20don%E2%80%99t%20have%20to%20do%20any%20further%20configuration.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22pnp-modern-search-page-04-search-box-web-part%22%20style%3D%22width%3A%20756px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F298690i40190059668FD435%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pnp-modern-search-page-04-search-box-web-part%22%20alt%3D%22pnp-modern-search-page-04-search-box-web-part%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-964517338%22%20id%3D%22toc-hId-964521184%22%3ESearch%20Results%20Web%20Part%3C%2FH3%3E%0A%3CP%3EThe%20next%20step%20is%20to%20add%20a%20%E2%80%9CPnP%20Search%20Results%E2%80%9D%20web%20part%20to%20the%20page.%3C%2FP%3E%0A%3CP%3EOnce%20the%20web%20part%20is%20added%20to%20the%20page%2C%20you%20have%20to%20connect%20it%20to%20the%20Search%20Box%20web%20part%2C%20to%20receive%20the%20query%20from%20there.%20You%20can%20do%20this%20by%20following%20these%20steps%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EEdit%20the%20page.%3C%2FLI%3E%0A%3CLI%3EEdit%20the%20properties%20of%20the%20Search%20Results%20web%20part.%3C%2FLI%3E%0A%3CLI%3ESwitch%20to%20page%20%E2%80%9C3%20of%204%E2%80%9D%20on%20the%20web%20part%20properties.%3C%2FLI%3E%0A%3CLI%3ETurn%20on%20%E2%80%9CUse%20input%20query%20text%E2%80%9D.%3C%2FLI%3E%0A%3CLI%3ESelect%20%E2%80%9CDynamic%20value%E2%80%9D%20in%20the%20radio%20button%20list.%3C%2FLI%3E%0A%3CLI%3ESelect%20%E2%80%9CPnP%20%E2%80%93%20Search%20Box%E2%80%9D%20in%20the%20%E2%80%9CConnect%20to%20source%E2%80%9D%20dropdown.%3C%2FLI%3E%0A%3CLI%3ESelect%20%E2%80%9CSearch%20query%E2%80%9D%20in%20the%20%E2%80%9CPnP%20%E2%80%93%20Search%20Box%E2%80%99s%20properties%E2%80%9D%20dropdown.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22pnp-modern-search-page-05-search-results-web-part-properties%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F298691i7F33281C0C5ECFE3%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22pnp-modern-search-page-05-search-results-web-part-properties%22%20alt%3D%22pnp-modern-search-page-05-search-results-web-part-properties%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EOnce%20done%2C%20save%20the%20page%20and%20enjoy%20your%20very%20first%20search%20page!%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22pnp-modern-search-page-06-search-page-101%22%20style%3D%22width%3A%20800px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F298692i21BB76583CD75EEE%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pnp-modern-search-page-06-search-page-101%22%20alt%3D%22pnp-modern-search-page-06-search-page-101%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CEM%3EThis%20article%20was%20originally%20posted%20on%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fsearchexplained.com%2Fdeploy-pnp-modern-search-web-parts-sharepoint-online%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3ESearch%20Explained%20Blog%3C%2FA%3E.%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2591265%22%20slang%3D%22en-US%22%3E%3CP%3EHow%20to%20create%20a%20PnP%20Modern%20Search%20Page%20in%20SharePoint%20Online%20-%20first%20steps.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2591265%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EGetting%20started%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EHow%20to%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Jul 27 2021 08:22 AM
Updated by:
www.000webhost.com