RSS Aggregator
Magnolia RSS Aggregator module provides the functionality to display external feed content on a Magnolia web page (feed aggregation) and generate internal feeds based on Magnolia content (feed syndication).
- For feed aggregation, the module relies on the Data module to aggregate, import, store and convert RSS/Atom feed content for use in the provided paragraphs.
- For feed syndication, the module provides feed generators and paragraphs that allow users to subscribe to Magnolia content.
- Download
- Installing
- Uninstalling
- Video
- Configuration
- Data module
- RSS Aggregator module paragraphs
- Standard Templating Kit
- Categorization module
- Security permissions
Download
Download the RSS Aggregatormodule from Magnolia Store or Nexus repository.Installing
RSS Aggregator is a community module (3.6 and higher) included in the Standard Templating Kit bundle and typically already installed. Go to Magnolia Store > Installed modules in AdminCentral to check. To install the module individually, see the general module installation instructions.Uninstalling
See the general module uninstalling instructions and advice.Video
Watch a video of this feature.Configuration
RSS Aggregator module
The RSS Aggregator module includes two paragraphs and associated dialogs, feedsListParagraph and combinedFeedsParagraph. The paragraph and dialog definitions are configured at Configuration > /modules/rssaggregator/paragraphs and /dialogs. These paragraphs display the content of aggregated feeds set up in the Data module. Their use is discussed in RSS Aggregator module paragraphs below.

In EE three (CE two) feed generators are registered in the module configuration at Configuration > /modules/rssaggregator/config/feedGenerators.
| Feed | Class | Purpose |
|---|---|---|
/rss | RSSModuleFeedGenerator | Generates a syndicated feed based on aggregate feeds defined via the RSS Aggregator module. Its use is discussed in RSS Aggregator module paragraphs below. |
/templateContent | PageSyndicator | Registered by the Standard Templating Kit module. Generates the feed for the stkExtrasContentTypeRSSFeed paragraph discussed in Standard Templating Kit - Syndicated feeds below. |
/category | CategorySyndicator | Registered by the Categorization module (EE). Generates the feed for the categoryRSSFeed paragraph discussed in Categorization module below. |

You can generate additional feeds by registering a customized feedGenerator.
Servlet
The RSS Aggregator module registers the FeedSyndicationServlet in the filter chain. This configuration is at Configuration > /server/filters/servlets/ FeedSyndicationServlet.
FeedSyndicationServlet writes an XML feed to the response. Based on the request parameters, the feedGenerators configuration (above) is resolved and used to generate the XML feed.

AdminInterface module
The RSS Aggregator module includes the Configuration > RSS Aggregator page and menu item that allows you to update external feeds manually or schedule regular updates. See Importing data below.
The module also includes a virtualURIMapping for RSS feeds at Configuration > /modules/adminInterface/virtualURIMapping/rssFeeds. This mapping redirects the syndicated feeds that are generated when the various paragraphs with this functionality are used.

Data module
The paragraphs that display aggregated feeds are reliant on the Data module. External feed data is imported into and stored in the Data module. The feed content is then retrieved by the paragraphs to display on the page.
In the Data module, installation of the RSS Aggregator module:
- Creates the
RssAggregatordata type.

- Creates the
RssAggregatordialog definition. - Registers and configures the
rssaggregatorimport handler.
For more information, see Data module.
RssAggregator dialog
The RssAggregator dialog is configured at Configuration > /modules/data/dialogs/RssAggregator.
The feeds and filters fields use special controls, FeedsControl and FiltersControl respectively. These controls allow for multiple field rows, i.e. the “Add” functionality and the multi layout of the fields. The name, title and description fields are simple edit fields.

To demonstrate the functionality of the Data module, we set up a new RSS Aggregator to retrieve sports news from the BBC http://newsrss.bbc.co.uk/rss/sportonline_world_edition/front_page/rss.xml and CNN http://rss.cnn.com/rss/si_topstories.rss in Data > RSS Aggregator.
In the RssAggregator dialog:
- The content of the Name, Title and Short Description fields are used exclusively by the Data module to identify the feed.
- In the Feeds field you can define a single feed or a number of feeds. The Title of each feed is used by the
feedListParagraphorstkSingleFeedparagraph to distinguish the individual feeds. The use of these paragraphs is discussed below in RSS Aggregator module paragraphs and Standard Templating Kit - Aggregation feeds. If you leave the title blank, the actual external feed title will be used. - The Filters field allows you to filter the feed content. Note that the filters are applied to all feeds.
- The first box allows for AND, OR and NOT conditions:
- The second box allows for a selection from the predefined options, CATEGORY, TITLE, AUTHOR or DESCRIPTION, that are commonly found in RSS feeds.
- The third box allows for the insertion of a value used to meet the condition and option of the first two boxes.

Importing data
The underlying functionality of the RSS Aggregator module takes care of importing the data and converting it to a usable state.
The rssaggregator import hander is configured at Configuration > /modules/data/config/importers/rssaggregator.

Configurable elements:
- Target transforms the imported data into a format suitable for data storage. Gets and sets the external URL of the file to be imported. The default target is
SimpleImportTarget. ThetargetPathproperty defines the path within the repository for storing the data. Default:/rssaggregator - Automated execution is a Cron job pattern for scheduling automatic execution of the import handler. See Quartz Cron Pattern for supported patterns. The example pattern specifies a daily update at 6 a.m.
- Feed fetcher is a multithreaded
FeedFetcherclass that retrieves the feed over HTTP. It follows redirects and supports conditionalgets. It attempts to fetch all feed channels defined in the RSS aggregator dialog simultaneously. Default:FastRSSFeedFetcher. - ActivateImport allows imported data to be activated automatically after a successful import. Default:
false - Class imports RSS and Atom feeds over HTTP for aggregate feeds defined in the Data module. Allows for the optional configuration of a
feedFetcherclass. This class is called by theimportCommandto execute the import. Default:RSSFeedImportHandler - Delete old data allows for the deletion and deactivation of data that is no longer found in the external system. Default:
false - Repository defines the target repository for the imported data. Default:
data
SimpleRSSFeedFetcher can be used as an alternative to FastRSSFeedFetcher in the /feedFetcher/class node. This simple, single threaded fetcher reduces server load and is suitable where there are a smaller number of feed channels and a larger window between data retrievals.
For a more general explanation of the configuration options, see Data module – Importing data.
In Data > RSS Aggregators, the Import data command manually imports the data for the individual feeds.

This command is registered at Configuration > /modules/data/config/commands/import. The command finds the importer that matches the name of the data type, rssaggregator in this instance, and invokes it.
Content will only display in the aggregation paragraphs after it has been imported into the Data module. Unless the /modules/data/config/importers/activateImport property is set to true, it is necessary to activate the data type to display feed content on the public instance
The screenshot below is of our new aggregator, sports, in Data > JCR Browser after setup.

In Data > RSS Aggregators, when you click Import data, the data is retrieved from the external feeds and stored in the Data module. The screenshot below shows the sports aggregator after the import. Two data nodes have been added to the /sports node, importState and usedImporterTarget to indicate the import, and there is a new content node, /sports/data. This node contains the two individual /channels and within each, the content of the sports articles are in individual /entry nodes.

You can also import feed data in Configuration > RSS Aggregator. This functionality imports all feeds set up in Data > RSS Aggregators:
- Start Update manually imports the feed data.
- Set automatically retrieves the data at regular intervals.
The Automatic Feed Update setting overrides any Cron pattern set in Configuration > /modules/data/config/importers/rssaggregator/automatedExecution/cron. To switch off automatic updates completely, set the enabled property in the /automatedExecution node to false.
RSS Aggregator module paragraphs
The RSS Aggregator module includes two paragraphs and associated dialogs, feedsListParagraph and combinedFeedsParagraph. These paragraphs display the content of aggregated external feeds set up Data > RSS Aggregators:
feedsListParagraphdisplays the articles for each feed in the aggregator sequentially. Each feed is identifiable by the feed heading, if any, inserted in the Data module.combinedFeedsParagraphcombines and displays all articles in the aggregator.
stkSingleFeed and stkCombinedFeed. Either paragraph set (or a combination) can be added to any STK template. The paragraph sets are very similar and below in Standard Templating Kit – Aggregation feeds we point out the differences.
The paragraph definitions of the RSS Aggregator module paragraphs are configured at Configuration > /modules/rssaggregator/paragraphs.

The dialog definitions are configured at Configuration > /modules/rssaggregator/dialogs. These definitions are used by both sets of paragraphs, i.e. also by the STK paragraphs.

These dialog definitions render the following dialogs when the paragraphs are made available to a template.

The following paragraphs render on the page. In addition to rendering the feed content, the paragraphs render RSS icons that allow users to subscribe to the feed/s. The RSSModuleFeedGenerator is used to accomplish this. See Configuration above.

Standard Templating Kit
Aggregation feeds
In addition to the feedsListParagraph and combinedFeedsParagraph paragraph definitions defined in the RSS Aggregator module, equivalent STK paragraph definitions are defined in the Standard Templating Kit. These are configured at Templating Kit > Paragraph Definitions > /teasers/stkSingleFeed and /stkCombinedFeed.

The two sets of paragraphs are identical in all respects except that they use differing model classes and templates as detailed in the table below. These element cause the paragraphs to render differently on the page and in the case of the RSS Aggregator module paragraphs, the RSS icon is included. We suggest that you use the STK paragraphs.
| Paragraph | Property | Value |
|---|---|---|
feedsListParagraph | modelClass | FeedListAction |
templatePath | /info/magnolia/module/rssaggregator/paragraphs/feedList.ftl |
|
stkSingleFeed | modelClass | FeedListModel |
templatePath | /templating-kit/paragraphs/teasers/stkTeaserSingleFeed.ftl |
|
combinedFeedsParagraph | modelClass | CombinedFeedAction |
templatePath | /info/magnolia/module/rssaggregator/paragraphs/combinedFeed.ftl |
|
stkCombinedFeed | modelClass | CombinedFeedModel |
templatePath | /templating-kit/paragraphs/teasers/stkTeaserCombinedFeed.ftl |
By default, the STK paragraphs are included on the stkSection template configured at Templating Kit > Template Definitions > /stkSection/mainArea/paragraphs/stkCombinedFeed and /stkSingleFeed.

These paragraphs, or those defined at Configuration > /modules/rssaggregator/paragraphs, can be added to any STK template. The screenshot below demonstrates the addition of the RSS Aggregator module paragraphs to the stkArticle template.

How to use the STK aggregation feed paragraphs is discussed in User Manual – Teaser Paragraphs - RSS Feed Paragraphs.
The STK paragraphs use the same dialogs as the RSS Aggregator module paragraphs. The screenshots below demonstrate the stkSingleFeed and stkCombinedFeed paragraphs.

Syndicated feeds
The stkExtrasContentTypeRSSFeed paragraph generates a RSS feed of pages based on the stkArticle, stkNews orstkEvent template.
The paragraph definition is configured at Templating Kit > Paragraph Defintions > /extras/stkExtrasContentTypeRSSFeed. This paragraph uses the ContentTypeSyndicateModel model to generate the syndicated content.

The dialog definition is configured at Templating Kit > Dialog Definitions > /paragraphs/extras/stkExtrasContentTypeRSSFeed.

By default, the stkExtrasContentTypeRSSFeed paragraph is available in extrasArea area of all templates. In EE, this configuration is at Templating Kit > Site Definitions > /default/templates/prototype/extras/paragraphs and in CE at Templating Kit > Site Configuration > /templates/prototype/extras/paragraphs.

This paragraph renders an RSS icon on the page that redirects to a feed subscription page using the virtualURIMapping definition discussed above in AdminInterface module.

How to use the stkExtrasContentTypeRSSFeed paragraph is discussed in User Manual – Teaser Paragraphs - RSS Feed Paragraphs.
Categorization module
The Categorization module (EE) includes the categoryRSSFeed paragraph and associated dialog. This paragraph generates a RSS feed based on article categories. The paragraph and dialog definitions are configured at Configuration > /modules/categorization/paragraphs and /dialogs.

By default, the categoryRSSFeed paragraph is available in extrasArea area of all templates. This configuration is at Templating Kit > Site Definitions > /default/templates/prototype/extras/paragraphs.

This paragraph renders an RSS icon on the page that redirects to a feed subscription page using the virtualURIMapping definition discussed above in AdminInterface module.
Categories are stored and managed in the Data module. For more information, see Categorization module.
How to use the categoryRSSFeed paragraph is discussed in User Manual – Teaser Paragraphs - RSS Feed Paragraphs.
Security permissions
The security settings in the standard installation do not permit public users to view the various aggregation paragraphs. The reason for this is that the permissions assigned to the anonymous role do not include rights to /rssaggregator in the Data repository. You can check this by logging out of the public instance. When you do this, this the feed content disappears from the paragraphs and is replaced by text indicating that there are no records for the feed.

To make the paragraphs publicly visible you need to assign Read only permissions to /rssaggregator in the Data repository for public users on the public instance. You can either add these permissions to the anonymous role directly or create a new role and assign it to the anonymous systems user. We demonstrate the latter below.
To create a new rss-aggregator-base role, in Security > Roles:
- Click New role.
- In the Access control list tab of the Edit role dialog, assign
Read onlypermissions to/rssaggreagtorin theDatarepository as demonstrated in the screenshot below. - Save.
To assign the new rss-aggregator-base role to the anonymous user in Security > Systems Users:
- Select
anonymous. - Click Edit user.
- In the Edit user dialog, add the
rss-aggregator-baserole to the list of roles in the Role field. - Save.
The feed content will now be visible to public users.