Friday 7 November 2008

Getting feeds from your own site

I recently wanted to pull in the news items from our main corporate site onto a partner site, on an existing 'news' page which already pulls in RSS Feeds from other major content providers such as the BBC, Learning Teaching Scotland and the Scottish Government. The trouble is, our corporate site does not generate such feeds, so until now I've had to manually input each new press release.

However, I'd heard that it was possible to grab content from pages even where those pages are not set up to offer RSS feeds.

A bit of searching brought me to feedity.com. This site allows you to easily set up an RSS feed based on the content of your site, and on inputting the target URL it quickly came up with a list of press releases, exactly as intended. You can also fiddle with the results if they're not as expected.

Once you've got your RSS feed, the next task is to pull it into your page. I've used Javascript to do this, using a handy script generator found at itde.vccs.edu/rss2js.

The end result can be seen at egfl.net/news. You'll see I've got feeds coming in from the sites mentioned above, as well as the newly generated feed from our own council site. There is of course also a noscript alternative linking to the pages with the news items.

Hey presto - no more updating manually!

Edit - there are other similar services to the ones I've mentioned here. For generating RSS feeds, also see Feed43, Dapper or FeedYes. For inserting the feeds into your page, also see RSSinclude or Dynaweb RSS Pal.

PS - don't forget that linking to third party Javascript carries a certain degree of risk. See my post about security and Google Analtyics for more info.

No comments: