Getting started with the FeedAPI module
RSS Feed Aggregation allows you to take RSS feeds from other sites on the web and import their content into a Drupal site.
You could for example import news from the BBC website or like DrupalSN import news from all the other great Drupal sites there are!
The core Aggregator module can provide a simple way of importing RSS feeds and it even provides Views integration which is great.
However, with the FeedAPI module you can transform each imported feed item into a node meaning it becomes searchable with your site and can be indexed by search engines which correct me if I’m wrong is good for SEO. But the main reason I import feeds into DrupalSN is for the experience so that users can get all the best Drupal news in one place without having to search around for it visiting numerous sites.
The FeedAPI (http://drupal.org/project/feedapi) is also due to bring a lot of it’s functionality into the core Aggregator module in Drupal 7.
See this link for more details: http://drupal.org/node/397748
- Download and unzip the module from http://drupal.org/project/feedapi
- Enable the “FeedAPI” and “FeedAPI Node” modules that are part of the FeedAPI bundle on the modules admin page.
If you want imported RSS feed items to be automatically categorized you should also enable the “FeedAPI Inherit” module
- You’ll also need to enable either the “Common syndication parser” module or the “SimplePie parser” module as the feed parser.
The “Common syndication parser” is ready to go whereas the “SimplePie parser” requires you to download additional files therefore the “Common syndication parser” is recommended.
A) How It works?
- The FeedAPI module provides a new “feed” node type and you create a new “feed” node for each external RSS feed you want to import.
- With the “FeedAPI Node” module enabled you can also create a node for each item the parent feed imports. The relationship between a “Feed” and a “Feed Item” is automatically recorded by the module.
- Each time your cron.php file runs the feeds are refreshed and new feed items are imported/created.
- The module offers full Views integration so you can create pages and blocks of feed items and theme as you would with other node types.
B) Feed API Basic Settings
There are some basic global FeedAPI configurations at Administer > Site Configurations > FeedAPI. They are self explanatory so I won’t expand you them.
C) Feed Item node type
You should create a new “Feed Item” node type which contains just a title and body field. As mentioned above “Feed Items” will be create for each item imported by the parent “Feed”.
NOTE: You could simply use the “Story” node type if it is not used for anything else.
D) Feed node type
- Navigate to Administer > Content Management and then click the "edit" link on the Feed content type.
- Scroll down to the new “Feed API” fieldset and select:
- Is a feed content type: checked
- Refresh feed on creation: checked
- In the “Processor settings” fieldset, under “Node type of feed items” select the node type you created in step C (you can overide this per feed if required).
- Save the content type
E) Create some Feeds
Now you need to create the Feeds to import by creating new “Feed” nodes the same way you create any node.
You should notice a new “Feed” fieldset where you should enter the URL (“Feed URL”) of the RSS feed you wish to import.
When you save the Feed node it will automatically refresh so you should end up with new “Feed Items” right away.
F) Create some Views
The Feed Item nodes can be used in Views like any other content type so you can create Views as normal.
For more information on creating Views see: http://drupal.org/node/114642
FeedAPI API docs: http://code.developmentseed.org/feedapi/api/files
FeedAPI project page: http://drupal.org/project/feedapi
This tutorial kicks off a number of tutorials that have been sponsored by Vancouver-based Drupal company, ImageX Media.
Find out more about ImageX Media and check out their work
<a href="http://imagexmedia.com/">http://imagexmedia.com</a>.<br /><br />Read the DrupalSN interview with ImageX founder <a href="http://glennhilton.com/">Glenn Hilton</a> http://drupalsn.com/imagex-media-interview
Commenting on this Tutorial is closed.