In this article we will show you how you can display page properties using ShortPoint Design Elements.
To complete this task we are going to use the REST API connection type. Please, follow the steps below.
TABLE OF CONTENTS
- Before we begin
- Step 1: Add a ShortPoint Design Element to the page
- Step 2: Connect your ShortPoint Design Element to REST API
- Step 3: Map the Items and save your page
Before we begin
- You need to have ShortPoint installed on your SharePoint site(s).
- You need to be a ShortPoint User with an active license.
- This solution works for both classic and modern pages.
- Platforms supported:
- Office 365
- SharePoint 2019 (SharePoint Online)
- SharePoint 2016 On-Premise
- SharePoint 2013 On-Premise
In your Site Pages library, you need to have the page properties you would like to display on your pages.
You can add page properties by creating a new column in the Site Pages library and editing its value for your page(s) using Properties option:
In this example we will display the Title and Contact Person page properties, that we have added:
Step 1: Add a ShortPoint Design Element to the page
Step 2: Connect your ShortPoint Design Element to REST API
Configure Change Path setting
Scroll down a bit and paste the following piece of code to the Change Path field:
var _spPageContextInfo = shortpoint._spPageContextInfo;
return _spPageContextInfo.webServerRelativeUrl + "/_api/web/lists/getbyid('" + _spPageContextInfo.pageListId +"')/items/getbyid(" + _spPageContextInfo.pageItemId +")";
Set Up Connection
Click Connect and wait for the connection to load.
Step 3: Map the Items and save your page
Here is how it might look like on your page:
That's it. Happy connecting!