If you currently have a Design Element displaying news post using one of the ShortPoint News connection types, and you want to display the number of likes for each news post, then this article is for you.
Note: For the purposes of this article, we are going to use a Simple list Design Element. However, you may also use any Design Element to your liking. If you would like to display the number of likes in your SharePoint list, you may want to visit How to Display the Number of Likes from the SharePoint List Items.
This is how it may look like on your page:
And a closer look at the likes in Simple List:
TABLE OF CONTENTS
- Before we begin
- Step 1. Go to SharePoint Search Configuration page
- Step 2. Create a Searched Manage Property
- Step 3. Update your ShortPoint News connection
Before we begin
- Make sure you have ShortPoint installed on your SharePoint site(s). We recommend you to always have the latest version installed. Visit our Download page to get the latest version of ShortPoint, or you can use the ShortPoint SPFx Auto Upgrade Feature to ensure you always have the latest version.
- You are a ShortPoint user with an active license.
- We assume that you already have experience with managing SharePoint Search Schema before following this article.
- In order to display the number of likes on a news post, you need to configure a Searched Managed Property to do the job.
- Currently, the LikesCount property that is being attached to the Selected Properties field is not correctly configured by SharePoint, thus we will need to configure a Searched Managed Property specific for this function.
- In this article, we assume that you already have a Design Element displaying news posts using Hub News, Org News, or Site News connection on your site.
Note: You may refer to this Microsoft article to know more about Searched Managed Property: Manage the search schema in SharePoint
Please follow the step-by-step solution below to ensure the proper configuration in displaying the number of likes for your connected news posts.
Step 1. Go to SharePoint Search Configuration page
You may access your SharePoint Search Configuration page using the link below:
yourtenant should be replaced with the URL of your SharePoint tenant.
Important: Changes should be made on the SharePoint tenant level, hence we have this level=tenant added in the URL.
Step 2. Create a Searched Manage Property
It is essential to create a new property specific to the number of likes function. Here's how to proceed with creation:
Step 2.1 Search for the Property
Under the Managed Properties tab, search for the following term: refinabledecimal. You may click the green arrow or just press the Enter key after typing the property.
Step 2.2 Select the Property
Select one of the RefinableDecimalXX property which doesn't have the Mapped Crawled Properties assigned. In this example, we will be using the RefinableDecimal00, but you can also use other RefinableDecimal available in the search results.
Step 2.3 Add Mapping to your property
Once you have selected the property you like to use, scroll to the bottom of the configuration page of your selected property, and click Add Mapping.
Step 2.4 Search and assign a term
Type the word Like in the search bar (1), and click Find (2) to search for the property. Look for the property: ows_LikeCount and select it (3).
Click OK to proceed (4).
Now, you should be able to see the property properly mapped. Click OK on the configuration page to save the changes.
On the Managed Properties page, if you search now by the same term (refinabledecimal), you should be able to see your Managed property mapped to a specific Crawled Property. Like this, for example:
Note: If you are planning to create more Managed Property for your People Search connection, you may also refer to this article: How to Connect ShortPoint with Custom User Profile Property Using People Search Connection.
Step 3. Update your ShortPoint News connection
Step 3.1 Go to Settings of your Design Element
The next step is by going to the settings of your Design Element to update your News connection.
- In Grid Mode (New ShortPoint Page Builder and Grid Mode)
Click the cog wheel icon to open the settings of the Simple List Design Element:
- In Legacy Page builder:
The Settings tab will open.
Note: Connect feature will soon be available in the Live Mode version as well.
Step 3.2 Disconnect news connection
Go to the Connect tab and disconnect your current news connection.
Step 3.3 Add the SharePoint Managed Property
Let's add the RefinableDecimal00 property we created in Step 2 to the Selected Properties field.
Step 3.4 Connect your Design Element
Once the property is added, click the Connect button to establish connection to your news.
This is how it looks like when your Design Element is successfully connected:
Step 3.5 Map the items
Switch to the Items tab and map the property by clicking the chain icon on the right and selecting the property RefinableDecimal00 from the dropdown:
Note: To know more about the items mapping, please check our ShortPoint connect: Basic Tutorial.
You may click the Preview button to check the results:
Then click Update to save your changes:
Important: You may have to wait for 15 minutes to 48 hours before the Likes counts reflect on your page. This is subject to SharePoint Crawl which runs for 15 minutes or longer.
Here is how the result will look like on your page: