SlideShare a Scribd company logo
Create PresidentQuotes Webpart using SharePoint RESTAPI and bootstrap
In this article I explain how to create a president Quotes Web part in SharePoint
using rest API and bootstrap.
Step1: Open SharePointsite.
Step2: Create a list in SharePoint“PresidentMessage” and thecolumns as per the
below image.
Step3: Create a SharePointpage and add a script editor Web part.
Step4: Add the code below.
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"
>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></s
cript>
<style>
.centered {
text-align: center;
width: 400px;
}
h2 {
font-family: "Times New Roman", Times, serif;
}
</style>
<script type="text/javascript">
jQuery(document).ready(function () {
var site = "https://pikasha12.sharepoint.com/sites/DLH/";
jQuery.ajax({
url: site +
"_api/web/lists/getByTitle('PresidentMessage')/items?$select=Description,Image
_x0020_to_x0020_Display,Author/Title&$expand=Author/Title&$filter=Status eq
'Active'&$top=1&$orderby=Created",
type: "GET",
headers: { "Accept": "application/json;odata=verbose" },
success: function (data) {
//scriptto build UI HERE
var slidInd ="";
jQuery.each(data.d.results, function (index, value) {
slidInd = '<img src="'+ value.Image_x0020_to_x0020_Display.Url+
'"/><h2>' + value.Description + ' </h2><h3>' + value.Author.Title + ' </h3>';
});
jQuery(".centered").append(slidInd);
getData();
},
error: function (data) {
//output error HERE
alert(data.statusText);
}
});
});
</script>
<div class="container-fluid">
<div class="panel-heading">
<h3 class="panel-title">CEO Message</h3>
</div>
<div>
<div class="centered">
</div>
</div>
</div>
Output

More Related Content

DOCX
Custom announcement in share point 2013
PPTX
SEO and Content Management System
PPTX
A Look at Rank Builder
PDF
Best Google Chrome SEO Extensions
PPTX
Off Page Optimization
PPTX
Off page optimization
PPT
Web 2.0 Marketing (Part 1)
DOC
Auto redirect, what is it and how it can be
Custom announcement in share point 2013
SEO and Content Management System
A Look at Rank Builder
Best Google Chrome SEO Extensions
Off Page Optimization
Off page optimization
Web 2.0 Marketing (Part 1)
Auto redirect, what is it and how it can be

What's hot (20)

PDF
Search Engine Friendly Pages
PPT
Sphinncon 2010: Using WordPress As Social Media & Seo Hub
PPTX
Fast, simple SEO tools for the beginner
PPTX
9 word press plugins you need to create killer Content
DOC
Linked In Profile General Tips2011
PPTX
Content search api in sitecore 8.1
PPTX
SharePoint 2013/O365 Web Part Gallery
PPT
Privilege Escalation And Misconfigurations
PDF
How to Change the search results are displayed
PPT
Pinned Sites in Internet Explorer 9
PPTX
PDF
Boss and Cap
PDF
Yahoo! Hack India: Hyderabad 2013 | Boss and Cap
PDF
WordPress Launch Checklist
PPTX
Manual versus Automatic Submission
PDF
Cool Dashboards and Visualizations for SharePoint Power Users
PDF
Exploring the New Search in SharePoint 2013 - What can you do now?
PPTX
Share point 2010-activity-feed
PPTX
How developer's can help seo
PPT
Information Architecture for SEO
Search Engine Friendly Pages
Sphinncon 2010: Using WordPress As Social Media & Seo Hub
Fast, simple SEO tools for the beginner
9 word press plugins you need to create killer Content
Linked In Profile General Tips2011
Content search api in sitecore 8.1
SharePoint 2013/O365 Web Part Gallery
Privilege Escalation And Misconfigurations
How to Change the search results are displayed
Pinned Sites in Internet Explorer 9
Boss and Cap
Yahoo! Hack India: Hyderabad 2013 | Boss and Cap
WordPress Launch Checklist
Manual versus Automatic Submission
Cool Dashboards and Visualizations for SharePoint Power Users
Exploring the New Search in SharePoint 2013 - What can you do now?
Share point 2010-activity-feed
How developer's can help seo
Information Architecture for SEO
Ad

Recently uploaded (20)

PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
RMMM.pdf make it easy to upload and study
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PPTX
Pharma ospi slides which help in ospi learning
PDF
Business Ethics Teaching Materials for college
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Anesthesia in Laparoscopic Surgery in India
Supply Chain Operations Speaking Notes -ICLT Program
Final Presentation General Medicine 03-08-2024.pptx
human mycosis Human fungal infections are called human mycosis..pptx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
RMMM.pdf make it easy to upload and study
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Module 4: Burden of Disease Tutorial Slides S2 2025
Abdominal Access Techniques with Prof. Dr. R K Mishra
TR - Agricultural Crops Production NC III.pdf
VCE English Exam - Section C Student Revision Booklet
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Pharma ospi slides which help in ospi learning
Business Ethics Teaching Materials for college
Ad

Create president quotes web part using share point rest api and bootstrap

  • 1. Create PresidentQuotes Webpart using SharePoint RESTAPI and bootstrap In this article I explain how to create a president Quotes Web part in SharePoint using rest API and bootstrap. Step1: Open SharePointsite. Step2: Create a list in SharePoint“PresidentMessage” and thecolumns as per the below image. Step3: Create a SharePointpage and add a script editor Web part. Step4: Add the code below. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css" > <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></s cript> <style> .centered {
  • 2. text-align: center; width: 400px; } h2 { font-family: "Times New Roman", Times, serif; } </style> <script type="text/javascript"> jQuery(document).ready(function () { var site = "https://pikasha12.sharepoint.com/sites/DLH/"; jQuery.ajax({ url: site + "_api/web/lists/getByTitle('PresidentMessage')/items?$select=Description,Image _x0020_to_x0020_Display,Author/Title&$expand=Author/Title&$filter=Status eq 'Active'&$top=1&$orderby=Created", type: "GET", headers: { "Accept": "application/json;odata=verbose" }, success: function (data) { //scriptto build UI HERE var slidInd =""; jQuery.each(data.d.results, function (index, value) {
  • 3. slidInd = '<img src="'+ value.Image_x0020_to_x0020_Display.Url+ '"/><h2>' + value.Description + ' </h2><h3>' + value.Author.Title + ' </h3>'; }); jQuery(".centered").append(slidInd); getData(); }, error: function (data) { //output error HERE alert(data.statusText); } }); }); </script> <div class="container-fluid"> <div class="panel-heading"> <h3 class="panel-title">CEO Message</h3> </div> <div> <div class="centered">