How to Install and Use the Drupal Aggregator Module

Drupal Aggregator Module

One of the most powerful aspects of Drupal is the fact that many of the most common types of functionality you might add to your website are already built as easy-to-install modules. The trick is to know that a particular module exists and what it is called.

Unfortunately, many of the modules have names which are not intuitive, and in my opinion that criticism applies to the Aggregator Module; a very useful module which displays external feeds on your website. Why would you need to use it?

Perhaps you want to bring in news feeds from a publication and display them on your website, or maybe you have a number of industry blogs that are publishing great information and you want to post links to those articles automatically. You can also incorporate feeds from social media like Twitter, Facebook, and Flickr.

Getting the module is as easy as installing any other, and perhaps more so because if you are using Drupal 7 then Aggregator is included in Drupal Core. The first step is to make sure you have access to Aggregator.

  1. Log in to the Administration screen for your website and click on “Modules”. You should see “Aggregator” listed in the “Core” section. If not, then you’ll need to download and install it.
  2. If for some reason your website does not have aggregator already, then go to http://drupal.org/documentation/modules/aggregator, click on the compressed file that’s associated with your version of Drupal and download it.
  3. Extract it to a directory on your hard drive, and then copy or upload it to your website in the “/modules” or “/sites/all/modules directory”.

Once it is installed, your Modules page should look like this:

Remember to scroll down to the bottom of the Modules administrator and save your changes in order to make sure the module is installed.

Configuring Aggregator Settings

Your first time putting it together, you can just accept the default settings for the listing page. The actual number of items that show in any given list will be determined once you add the feeds and categories to the list. The default settings screen looks like this:

Adding Aggregator Categories

To administer your aggregator, first you click on Configuration => Web Services => Feed Aggregator. On this screen you have two choices. You can add categories, and/or you can add feeds. We’ll start with categories and then we’ll add an actual feed.

Click on the “Add Category” link

Fill out the form with descriptive information for your new feed category

Save the category, then go back to your list page so you can add your feed. Click the “Add Feed” link.

Now you can add in the location information for the feed you wish to display.

You’ll notice that the category we created called “Drupal News” shows up here, and we can create multiple categories that can be assigned to feeds and used to filter information in different blocks. For the purposes of this article we are using the drupal news feed located at http://drupal.org/node/feed, but you could use any well-maintained feed for your site.

Add the Feed Block to Your Layout

The final step is to add the feed to your layout. In order to do this, you’ll need to click on Structure => Blocks and then scroll down to the “Disabled” section of blocks. You can select either the category or the feed. In this case I’m selecting the feed, however if you had multiple feeds you were bringing into one category, then you would select the category.

I am setting mine to insert the block in “Sidebar second”, but it would work anywhere you put it. Make sure you save your block settings.

Important: You must enable and run Cron before any data will show up!

You can manually run cron by going to Configuration => System => Cron, and then click the “Run Cron” button. Surf back to your website and refresh a page that contains the block you added (in this case, it’s the homepage).

And that’s it! You have successfully added a feed to your Drupal site!

If you would like to see this operation in action, then feel free to watch the accompanying video, “How to Install and Use the Drupal Aggregator Module.”