Posts

Showing posts from August, 2022

You cannot edit this page - SharePoint online modern page

Image
Environment  SharePoint online Problem  When working with pages I sometimes get this error when trying to edit or republish the page.   Solution To resolve this error, we need to change the content type to Site page. Go to the Site contents  And open the Site Pages library Chances are that the page is still checked out. Check it in or discard check out. Select the page Click on the i  to show the details Select Site Page  for the content type (If the content type is Site Page, then select Wiki Page, publish the page, and repeat the steps above to select Site Page) Now you can edit and republish the page

Show a users display name in a PnP Modern Search Results Web Part using handlebars helpers

Image
Show display name in a PnP Modern Search Results Web Part using handlebars helpers. I have added a search results web part to a page to show a list of my projects. One of the columns should show who is the Project Manager. To do that I used the details list and configured the columns as shown in the images below.     In row 4 I entered {{ProjectmanagerOWSUSER}} This produces:  pkops@hxxxxr.nl | Pieter Kops | 693A30232E667C6D656D626572736869707C706B6F7073406861757A657 Then I found out how to use handlebars and came up with this: {{itemAt (split ProjectmanagerOWSUSER "|") 1}} And that gave me my display name: Pieter Kops How does it work First split the ProjectnmanagerOWSUSER field at the | sign This creates an array of 3 values… 0 - pkops@hxxxxr.nl 1 - Pieter Kops 2 - 693A30232E667C6D656D626572736869707C706B6F7073406861757A657 Next take the number 1 value of the array More info on handlebars https://github.com/helpers/handlebars-helpers/