Automatically generated content

While this isn't technically user content, it is a very useful and important feature. If you remember, in the previous chapter, we mentioned RSS that allowed our visitors to read parts of our site through news reader programs. What the aggregator does is take an RSS feed and turn it into content. If a relevant web site has an RSS feed of news or information (and they are happy with it being displayed on third-party web sites), then we can automatically import this information onto our site.

For our Dino Space site, we may wish to automatically post content from related blogs or web sites; perhaps a Dinosaur vaccine alert web site, which posts news on Dino illnesses and their treatments.

ScienceDaily has an RSS feed related to dinosaur fossil finds, available from their web site: fossils_ruins/dinosaurs/. I've created a custom feed to use in this section, which was a little more relevant to our site.

One of the new options within our Drupal administration page is Feed aggregator under the Content management category.

Feed aggregator

Configure which content your site aggregates from other sites, how often it poils them, and how they're categorized.

The overview of the Feed aggregator module shows us a list of feeds and categories currently contained within the module (there are currently none) along with the options to add a new category, add a new feed, and configure the modules settings.

Feed aggregator Add category Add feed settings

Thousands of sites (particularly news sites and blogs) publish their latest headlines and posts in feeds, using a number of standardized XML-based formats. Formats supported by the aggregator include RSS, RDF, and Atom.

Current feeds are listed below, and new feeds may be added. For each feed or feed category, the latest items block may be enabled at the blocks administration page.

Feed overview

Title Items Last update

Next update


Category overview

Title Items


It is a good idea to group relevant feeds into categories. This will help the organization of information on the web site, especially if we end up adding a large number of feeds to the site.

At the moment, we are adding a feed related to the health of the dinosaurs (which our members may find useful), so let's create the category health. To do this, we need to click the Add category link and then enter a Title for the category. We can also add a Description, but this is not a required field.

Feed aggregator List Add feed settings

Categories allow feed items from different feeds to be grouped together. For example, several sport-related feeds may belong to a category named Sports. Feed items may be grouped automatically (by selecting a category when creating or editing a feed) or manually [via the Categorize page available from feed item listings). Each category provides its own feed page and block.



Important news related to the health and welbeing of your pet dinol

I Save I

Now that we have a category which can contain our feed, we can add the feed to our site so that the content will automatically be posted!

Finding the RSS feed of a site

Web sites or blogs which have RSS feeds available generally have a link to the feed, either as text saying "RSS Feed" or "Syndicate this blog". Alternatively, it may be an image provided by FeedBurner or a small orange square with a white dot in the bottom left hand corner. Clicking the link will take you to the RSS feed; make a note of the URL of this page, as we will need it. In Internet Explorer, there is an RSS icon next to the home page link. If it is orange, it means that the page has a feed assigned to it, and you can click on it to see the feed.

To add the feed, we need to click the Add feed link, and then enter a Title for the feed, its URL, select an Update interval and select the categories into which the feed should be grouped.

Feed aggregator Ust Add category Settings

Add a feed in RSS, RDF or Atom format, A feed may only have one entry.

Dinosaur Disease and Infection Feed

The name of the feed (or the name of the website providing the Feed). URL: * The fully-qualified URL of the feed.

Update interval:

15 miri

The length of time between Feed updates. (Requires a correctly configured cron maintenance task.]

Categorize news items:

121 Health

Mew feed items are automatically filed in the checked categories.

The Title is displayed on the aggregator page, and should reflect what the feed is about. So I've called this one, Dinosaur Disease and Infection Feed. The URL of the feed is the location of the feed so that Drupal can get the contents and create content from it. The Update interval tells Drupal how often to check to see if the feed has been updated. Let's leave this at 15 minutes for now; it won't make any difference to us yet, as we don't have cron (refer to the Cron section later in this chapter) tasks set up correctly. However, we can tell Drupal to manually check the feed and create content until we have cron configured properly.

Clicking Save then adds the feed to our site, where we can see it from the Feed overview area.

Feed overview Tide


Last update

Next update


Dinosaur Disease and Infection Feed

l item

0 sec ago

15 min left

edit remove items update items

Category overview

Title Items


Health 1 item


Since we told Drupal to check for updates every 15 minutes, this feed has another 15 minutes to wait before it is checked again. We can manually check for updates by clicking update items. All of the content which is created from a feed can be removed via the remove items link.

Was this article helpful?

0 0

Post a comment