RSS Widget 

Changed in version 14.0

The RSS widget was extended to support Atom feeds (commonly used by GitHub, GitLab, and other platforms)

class RssWidget
Fully qualified name
\TYPO3\CMS\Dashboard\Widgets\RssWidget

Widgets using this class will show a list of items of the configured RSS feed or Atom feed.

RSS widget with the latest TYPO3 news

The widget "TYPO3 news" shipped with the dashboard extension is an RSS widget.

The "RSS Widget" supports both RSS and Atom feeds via automatic detection.

Widget instances are fully configurable with custom labels, feed URLs, and display limits. Each widget can be configured independently, allowing multiple feeds of different formats on the same dashboard

Automatic caching ensures optimal performance with configurable cache lifetimes.

Usage of the RSS Widget in the dashboard 

You can use this kind of widget to show your own RSS feed or Atom feed.

  1. Navigate to the dashboard where you want to add the widget
  2. Click "Add widget" and select the RSS widget
  3. Click the settings (cog) icon to customize the widget
  4. Configure the feed URL (RSS or Atom), limit, and label as needed
  5. Save the configuration to apply changes

Restricting the hosts of the feeds 

New in version 14.3.12 Important: #110471 - Allow restricting request hosts of RSS dashboard widgets

Before, the widget also read feeds from other sources, such as local files, and the settings of a widget could override the feed URL of the widget registration.

The RSS widget fetches feeds over HTTP and HTTPS only.

By default, the widget can request any host. A backend user who can configure an RSS widget can therefore make the server send requests to any host, also to hosts in an internal network. Restrict the hosts in $GLOBALS['TYPO3_CONF_VARS']['HTTP']['allowed_hosts']['dashboard_rss'] . Allow only the hosts of the feeds that your dashboards use:

config/system/additional.php
$GLOBALS['TYPO3_CONF_VARS']['HTTP']['allowed_hosts']['dashboard_rss'] = [
  // Hosts of the TYPO3 news feed
  'typo3.org',
  'news.typo3.com',
];
Copied!

The restriction applies to every feed request, also to redirect targets and to the feed URL of a widget registration. If a host is not allowed, the widget does not load the feed and shows a notice instead.

For wildcards and the values that allow or block all hosts, see the allowed hosts in TYPO3 Explained.

Feed format support 

The RSS widget now supports both feed formats:

RSS Feeds:

Item titles
Displayed as clickable links
Publication dates
Used for sorting entries (newest first)
Descriptions
Displayed as entry content (HTML tags stripped)

Atom Feeds:

Entry titles
Displayed as clickable links
Publication dates
Used for sorting entries (newest first)
Content/Summary
Displayed as entry description (HTML tags stripped)
Author information
Name, email, and URL when provided in the feed

Example for RSS widget with Atom feed 

EXT:my_extension/Configuration/Services.yaml
services:

  # Button provider for external link
  dashboard.buttons.github_releases:
    class: 'TYPO3\CMS\Dashboard\Widgets\Provider\ButtonProvider'
    arguments:
      $title: 'View all releases'
      $link: 'https://github.com/TYPO3/typo3/releases'
      $target: '_blank'

  # RSS widget with Atom feed URL
  dashboard.widget.github_releases:
    class: 'TYPO3\CMS\Dashboard\Widgets\RssWidget'
    arguments:
      $buttonProvider: '@dashboard.buttons.github_releases'
      $options:
        feedUrl: 'https://github.com/TYPO3/typo3/releases.atom'
        lifeTime: 43200
        limit: 10
    tags:
      - name: dashboard.widget
        identifier: 'github_releases'
        groupNames: 'general'
        title: 'LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:widgets.github_releases.title'
        description: 'LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:widgets.github_releases.description'
        iconIdentifier: 'content-widget-rss'
        height: 'large'
        width: 'medium'
Copied!

Options 

refreshAvailable
Type
boolean
Default
false

Boolean value, either false or true .

Provides a refresh button to backend users to refresh the widget. If the option is omitted false is assumed.

The following options are available via services.dashboard.widget.t3news.arguments.$options :

label
Type
string
  • Custom title for the widget instance
  • Optional field that defaults to the widget's default title
feedUrl
Type
string
Changed
14.3.12, Important: #110471 - Allow restricting request hosts of RSS dashboard widgets

Defines the URL providing the RSS Feed. This is fetched by the widget in order to show its entries.

If the widget registration sets this option, the settings of a widget cannot override it. The URL must use HTTP or HTTPS, and its host must be allowed, see restricting the hosts of the feeds.

lifeTime
Type
int
Default
43200

Defines how long to wait, in seconds, until fetching RSS Feed again.

limit
Type
int
Default
5

Defines how many RSS items should be shown.

Dependencies 

$buttonProvider
Type
\TYPO3\CMS\Dashboard\Widgets\ButtonProviderInterface

Provides an optional button to show which is used to open the source of RSS data. This button should be provided by a ButtonProvider that implements the interface ButtonProviderInterface .

See Adding button to Widget for further info and configuration options.