Posts

Showing posts with the label Site Pages

Adding Script Editor web part to SharePoint classic page using PowerShell

Image
 Hi friends, When we are migrating the SharePoint on-prem to SharePoint online, we need to tell the users about the site is migrated and there are multiple ways of doing it. One of them is to add the redirection script on the page so that the user will get redirected by itself to the newly migrated site. In this blog, I will be showing how to add the script editor web part using the PowerShell and add the script as well. Problem Statement I have a SharePoint list where all the old sites and new sites are mapped. Need to read all the items and add the script editor web part along with the script for the redirection of the page to the new site URL. Script added - It highlights the page and redirects the user to the new site after 10 seconds. Note: If there is a need to change in the script, do change in the  $WebPartXml  variable. Hope this script will save a lot of time and will help you. Happy Coding..!!

List View row Formatting: Discussion Board

Image
Hi Friends, I have seen that in on-prem many of the users are using the discussion feature, but in SharePoint Online we do not have this feature. To give it a thought I have implemented somewhat similar functionality. Discussion board formatting gives the ability to showcase the discussion which is a page, under specific category which will make more sense to the discussion board. So, whatever category you want to create, create the folder for that and the corresponding pages beneath it. This discussion board formatted displays the banner image (not the thumbnail image) and showcases it in the front along with the title, description, Likes, Comments, Date of last edit, and the owner of the page(not the author). No new column needs to be created only the existing column needs to be added to the view. For that execute the below PnP code # If want to modify the existing view Set-PnPView   - List  " Site Pages "   - Identity  " ...