Doing nothing fancy, just your normal Intranet Front-Page
Got two WebComponents that display a News Carousel and Summary List
<news extract="newsheadlines" display="carousel">
<news extract="newssummary" display="itemtemplate:newssummary">
(and a couple of lines of code to make this all happen)
The techie stuff
So it starts with an almost empty HTML page
To get it filled:
- Call a Pages endpoint to get the newest published News Messages
- Since we don't get the Publishing IMAGES in that first call,
Having to do extra calls (for each Item) to the FieldValueAsHtml endpoint to get the IMG URIs
Now the gurus say performance can be increased by Batching REST calls
Resources:
- https://msdn.microsoft.com/library/office/dn903506.aspx
- http://www.vrdmn.com/2016/08/batch-rest-requests-in-spfx-using.html
- http://www.andrewconnell.com/blog/part-2-sharepoint-rest-api-batching-exploring-batch-requests-responses-and-changesets *
Questions
Has SPOnline been patched, can we now get the Publishing Images URIs in the item call?
That would elminate all those next requests[Correct me if I am wrong, I have never used batching] My First REST call gets the ItemIDs of the Pages I then need to query for the Publishing IMGs
HOW can this be done with batching?, How can a next-in-line batch command change its endpoint based on a previous endpoints result?
So all I can batch are the calls for IMG URIs