Udostępnij za pośrednictwem


Make the RSS Feed Viewer Web Part Dynamic Using Filters and Web Part Connections

One of the shortcomings of the RSS Viewer web part is that it can only be bound one feed.  In this walkthrough, I’ll show you how to make the RSS Viewer web part dynamic with filter web parts and web part connections to enable binding to multiple feeds.

 

Create the RSS Feeds List

In View All Site Content, select Create

image

Select Custom List and enter a name such as “RSS Feeds.”  Next, add two columns to the list.  The first column will hold the feed URL and the second column is a one-line description of the feed that will be displayed in the filter list.  Name the column “Feed URL,” set the type to Single line of text (not Hyperlink), make it required, and add it to the default view.

image

Add the description column.  Name the column “Feed Description,” set the type to Single line of text, make it required, and add it to the default view.

image 

Next, add some feeds to the list:

image 

Add an RSS Viewer Web Part

Add an RSS Viewer web part to a page:

image

Configure the web part to default to your favorite feed:

image

 

Add a Filter Web Part

Add a filter web part to the page to control which feed is displayed in the RSS Viewer.  Add a SharePoint List Filter web part to the page:

image

Configure the filter web part to use the values from the feed list:

image

 

Connect the Filter Web Part to the RSS Viewer Web Part

Next, connect the filter web part to the RSS viewer web part.  Select Connections > Send Filter Values To > RSS Viewer:

image

Set the Connection Type to “Get Feed URL From”:

image

 

Test the Filter

Click the browse button on the filter:

image

Select one of the feeds and the corresponding feed should display in the RSS Viewer:

image 

 

Conclusion

The RSS Viewer web part can be made more dynamic and provide a better user experience by using filter web parts.  In this walkthrough I showed you one type of filter, but I invite you to investigate other approaches using some of the other out of the box filter web parts.

 

References and Additional Reading

Comments