You can now choose to display the contents of custom columns you created for news posts and links when using any of the ShortPoint News Connection types. This is possible with the new Selected Properties field in the Site News, Hub News, or Org News connections. Learn how to add your custom properties and map them to show on any ShortPoint Design Element in this article.
In this article, we will show you how you can display content from a custom column like the example below:
Note: This feature is currently available only in ShortPoint News Connections - Site News, Hub News, or Org News.
TABLE OF CONTENTS
- What you need to know before we start?
- How to Display Custom Properties
- You have ShortPoint SPFx version 7.5.x.xx or later on Office 365 (SharePoint Online) or SharePoint 2019 environment.
- You are a ShortPoint User with an active license.
- You have news posts and news links that have custom properties and have admin access to Site Pages library or your tenancy’s Search Managed Properties page.
What you need to know before we start?
The News Connections uses two distinct SharePoint services to be able to request data from your site collections. They are:
- REST API is used to interact directly with a single site, within or outside your site collection, allowing you to display information instantaneously. This is the service used when you are using the Site News connection type and selecting a single site from current or other sites as well as when you are adding a site URL as an option.
To search news content using REST API, you will need the Internal Name of the custom column you created containing the content you want to display.
- Search API is used to interact with multiple sites: including your subsites, hub sites, and their associated sites, and sites across the organization. It relies on the data crawled in the SharePoint Server and therefore requires a few minutes or more before it appears when connected in a Design Element. This is the service used when you are using Site News connection type with other sites or subsites added. It is also the service used for Hub News and Org News connection types.
To pull news content using Search API, you will need the Managed Property Name of the site column containing the data you want to display. You can visit this article from Microsoft on how site columns become managed properties.
Get the Internal Name or Managed Property name of your custom column before proceeding to the steps in mapping their custom properties in News Connections.
Note: To know more about how to collect property names, please refer to our article on How to Identify Custom Property Names in SharePoint
How to Display Custom Properties
It is easy to map custom properties so that they can be connected and displayed within a ShortPoint Design Element. Follow these steps:
Step 1: Insert Design Element
In the ShortPoint edit mode, select the Design Element you want to use from Page Builder.
Step 2: Select connection type
Go to the Connect tab and choose one of the three News connection types. In our example, we will use Site News connection.
Note: For Step 2 and 3, you can refer to our support articles on Site News, Hub News, and Org News connection types to get more detailed information.
Step 3: Complete connection fields
Add information in the required fields.
Here, we will be selecting multiple sites. Adding an Item Limit of 5 and setting the sort order to Date Created (Descending Order).
Step 4: Add custom property name in Selected Properties field
Notice that the Selected Properties field already has content added. These are the available default properties that SharePoint provides in every news post or link that is created. You can choose to delete any of these properties if you do not wish to use them.
Enter the Internal name or Managed Property name you collected to add it to the mapping options. Remember to add a comma in between property names.
In our example, we identified that the Managed Property name of our custom column is SupportTeamItemOWSTEXT. We are adding this to the Selected Properties field.
Note: When adding Managed Property names, please ensure that you move the single quotation (‘) to the end of the list. This ensures that the new properties are included when the connection runs.
Step 5: Hit Connect
Once completed, you can press the Connect button and wait for confirmation that the connection has been established.
Step 6: Map custom properties
Go to the Items tab. This is where you can map the news post or link properties you wish to dynamically display within the Design Element. Select from the list of properties in the dropdown which now includes the custom properties you entered in the Selected Properties field.
In our example, we are mapping the Managed Property SupportTeamItemOWSTEXT to the Description field.
Once this is done, you can press Preview to check the result.
Step 7: Insert or update Design Element
Your Design Element is now connected to your news sources and displays the custom property content you mapped out.
When everything is in place, Insert or Update the Design Element. You can then Save your changes and/or Publish the page.
That is all! Have fun displaying important content about your news posts and links on your intranet sites.