The News component enables you to display multiple headlines, abstracts, and images in a news feed. It's ideal for displaying data from social media streams or RSS feeds.
This article uses Google News as an example and describes how to build a Klip using an RSS feed and the News component. You will learn how to:
- Find an RSS feed URL and use it to create an RSS feed data source.
- Build a Klip, using the News component, that displays live news feed information.
- Format a Klip to display content, such as a headline, description, links from the headline to the full news article, and copyright and date information.
Following is an example of a Klip that uses the News component and an RSS feed data source (Google News).
This is the structure of the News component. Each of the sub-components in the News component is pre-formatted. This section of the Klip Editor is called the Component Tree.
Finding an RSS feed URL
The first thing you need to do is find and copy the URL for the RSS feed you want to use as your data source.
To find your RSS feed URL (using Google News as an example):
- Navigate to your news feed: https://news.google.com/news/.
- Scroll to the bottom of the page and select RSS. A page of code displays.
- Copy the URL of that page. (For example, https://news.google.com/news?pz=1&cf=all&ned=ca&hl=en&output=rss)
You will use this URL when creating your RSS feed data source.
Creating an RSS feed data source and Klip
To create an RSS feed data source and Klip (using Google News as an example):
- Click the Library link.
- Select the Data Sources tab.
- Click Create a New Data Source.
- Under Core Connectors, select REST/URL.
- On the New Data Source page, paste the RSS URL you copied earlier into the Query URL text box.
- For Data Format select XML.
- For Method select GET.
- Click Get Resource.
- Click Continue.
- Enter a Name for your data source, select an appropriate refresh rate, and click Save.
- On the About this Data Source page, select Build a Klip with this Data Source.
- Select News Component.
You are now ready to format your RSS feed Klip.
Formatting an RSS feed Klip
You format your Klip by using the XML results (that display in the Data panel) to reference sub-components in the Component Tree, for example, you can add a headline, a description, a link from the headline to the full news article, and copyright and date information.
To add a headline:
- In the Component tree, select Headline.
- In the Data panel, under item, select the title node.
A headline displays in the Klip.
To add a description:
- In the Component tree, select Content.
- In the Data panel, under item, select the description node.
A description displays in the Klip.
To add a link from the headline to the full news article:
- In the Component tree, select Link.
- In the Data panel, under item, select the link node.
Your headline is now a link to the full news article.
To add an author (or copyright date, depending on the news feed type):
- In the Component tree, select Author.
- In the Data panel, under channel, select the copyright node.
@ 2017 Google displays at the bottom of your Klip.
To add a date:
- In the Component tree, select Date.
- In the Data panel, under item, select the pubdate node.
The publication date displays at the bottom of your Klip.
To save your Klip:
When you are finished creating and formatting your Klip:
- Click Save.
- Name your Klip.
- Click Finished.