Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Out Of Box Webparts In Page Layout Using SharePoint Designer
WhatsApp
Saurabh Jain
8y
7.4
k
0
2
25
Blog
Use out of box webparts in page layout using SharePoint Designer SharePoint 0365 / SharePoint 2013:
Requirement
To create a content search webpart which should be accessed along with page layout in all the pages.
Solution
We have created SharePoint out of box content search webpart O365 Online account, tested it in one page, and exported it to .WebPart file. This will give you an xml schema of webpart.
So let's start with creating web part in SP O365 aspx page
Steps 1
Edit Page
Step 2
Create Content Search Webpart
Step 3
Add your required query and template.
Step 4
Export the webpart in .wbpart file and save it in your file system.
The .webpart file will look like shown below.
Now you have to use this webpart in your page layout as page layout so whenever you apply this page layout on any page in the site this webpart will come by default. To achive this requirement please follow the steps below.
Step 1
Open the Sharepoint designer
Step 2
Open the page layout where you want to add webpart that should be your .aspx page
Step 3
Create a div in the page and add a webpart to the page using designer, PFB.
Step 4
You have to update your newly created webpart in Sharepoint designer using the exported webpart which you have exported in .webpart file in your file system, PFB.
Replace “ with " and replace the DataProviderJSON property Value into designer, This will update your Search Query in the Sharepoint Designer page
Update the above script into designer page by replacing “with "
Finally you can update the other properties in the SharePoint Designer such as Title, webpart Template ulr as shown below.
I hope this will help you to export out of box webpart from Sharepoint O365 site page and import it using Sharepoint designer into Page layout and save you time.
O365 SharePoint Designer
Out of box Search webpart
Page layout
SharePoint
Up Next
Retrieve Webpart Properties of a SharePoint Page using REST API
Ebook Download
View all
Getting Started with SharePoint Framework Development using TypeScript, PnP JS, and React JS
Read by 4.9k people
Download Now!
Learn
View all
Membership not found