TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Out Of Box Webparts In Page Layout Using SharePoint Designer
Saurabh Jain
Dec 08, 2016
7.3
k
0
2
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
Use out of box webparts in page layout using SharePoint Designer SharePoint 0365 / SharePoint 2013.
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.
Out of box Search webpart
Page layout
SharePoint
O365 SharePoint Designer
Next Recommended Reading
Retrieve Webpart Properties of a SharePoint Page using REST API