Share » Learn » eZ Publish » How to Import and Export RSS Feeds

How to Import and Export RSS Feeds

Wednesday 20 August 2008 12:14:00 pm

  • Currently 5 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

With the eZ Publish RSS export feature, you can make selected parts your site's content available to other websites and Internet users via RSS. Then, whenever you add or modify content, your RSS feed is automatically updated and thus the changes are syndicated to all relevant parties. This is simpler to set up than the import procedure and can be done completely in the Setup tab of the Administration Interface.

Conceptually, RSS export works by displaying selected eZ Publish content in an RSS format instead of using the standard eZ Publish templates. This means that, in several ways, eZ Publish RSS feeds are like other eZ Publish content:

  • RSS feeds are available at a certain URL within an eZ Publish site
  • eZ Publish caching functions operate for RSS feed exports
  • It is possible to use the eZ Publish permission system to control access to RSS feeds.

Example procedure

To create an RSS feed, first click the RSS link in the Setup tab. Then, click the New export button in the RSS exports window.

New export button

The RSS Export interface will be displayed, as shown below.

RSS Export interface

The fields for the new RSS field are explained in the following table.

Field Explanation Example
Name The name of the RSS feed to create / export. “eZ Tennis Club News”
Description A brief description of the RSS feed that will be included in the XML file (and therefore may be used by people who import or use the RSS feed). “eZ Tennis Club News, including tournaments, training events, game tips, and social events news”
Site URL The base URL for the RSS feed; see the in-context help for more information “http://www.eztennisclub.com/index.php”
Image An image or logo to represent the source of the RSS feed. For example, BBC Tennis news uses a BBC Sport logo. (This is being made available for people to use in conjunction with the RSS items being exported, subject to any terms of use you specify.) An image in your site's media library
RSS version The RSS version for the export (either RSS 1.0 or RSS 2.0). “2.0”
Number of objects The number of eZ Publish content objects to include in the RSS feed at a time. Note that the objects are ordered based on the sort order specified for sub-items at the source location. “20”
Active When marked, this sets the RSS feed as being live and accessible. In the unmarked state, the RSS feed is not accessible. (Checked - True)
Main node only When marked, this means that secondary locations for objects at the source location (to be defined shortly) are not included in the feed. (Checked - True)
Access URL The path where the RSS feed will be publicly accessed. “ez_tennis_club_news”

The bottom part of the RSS Export interface specifies the eZ Publish site content to be included in the RSS feed:

Source location information

The fields are explained in the following table. Basically, the sub-items of the location(s) you specify will be included in the RSS feed.

Field Explanation Example
Source path The node whose sub-items are to be included in the RSS feed. “/Home/eZ Tennis Club News”
Subnodes Whether or not to include content objects from sub-nodes (that is, more than one level below) of the source node. (Unchecked – false)
Class The class whose objects are to be included in the RSS feed. Sub-items that are of other classes will not be included. (Article)
Title This sets the attribute of the eZ Publish object that will be used to provide each RSS item's Title element.
(Note that the attributes available to assign as either the Title or Description elements are populated when the adjacent Set button is clicked.)
(Title)
Description This sets the attribute of the eZ Publish object that will be used to provide each RSS item's Description element. (Summary)

It is possible to add multiple subtree locations as sources for the RSS feed. To add another source location, click the Add source button.

When you have finished configuring the RSS export, click the OK button at the bottom of the interface. The new RSS export will then be listed, as shown below.

RSS export confirmed

Completing an RSS export

With the steps above completed, the RSS export will be available on your website and will be automatically updated whenever you add or modify content at the source location(s). You can check this by going to the URL for the RSS feed, such as http://www.eztennisclub.com/index.php/user_siteaccess/rss/feed/ez_tennis_club_news.

However, having the RSS feed available is only one part of the exercise; you will want to do some things to encourage and organize the use of the RSS feed. For example:

  • Tell people the RSS feed is available, with information on your website about the feed and the URL where it can be accessed
  • Provide information about how often it is useful for people to check the RSS feed for new content (for example, daily if new items are added daily)
  • Provide information on copyright and terms of use (see the earlier comments from the RSS import explanations)
  • Consider listing the RSS feed on RSS directory sites
  • Identify website statistics to monitor in order to assess the performance of your RSS feed

Printable

Printer Friendly version of the full article on one page with plain styles

Author(s)