RSS Widget¶
- class RssWidget ¶
-
- Fully qualified name
-
\TYPO3\
CMS\ Dashboard\ Widgets\ Rss Widget
Widgets using this class will show a list of items of the configured RSS feed.
You can use this kind of widget to create a widget showing your own RSS feed.
Example¶
services:
cache.dashboard.rss:
class: 'TYPO3\CMS\Core\Cache\Frontend\FrontendInterface'
factory: ['@TYPO3\CMS\Core\Cache\CacheManager', 'getCache']
arguments:
$identifier: 'dashboard_rss'
dashboard.buttons.t3news:
class: 'TYPO3\CMS\Dashboard\Widgets\Provider\ButtonProvider'
arguments:
$title: 'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:widgets.t3news.moreItems'
$link: 'https://typo3.org/project/news'
$target: '_blank'
dashboard.widget.t3news:
class: 'TYPO3\CMS\Dashboard\Widgets\RssWidget'
arguments:
$buttonProvider: '@dashboard.buttons.t3news'
$options:
feedUrl: 'https://www.typo3.org/rss'
# 12 hours cache
lifeTime: 43200
refreshAvailable: true
tags:
- name: dashboard.widget
identifier: 't3news'
groupNames: 'typo3'
title: 'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:widgets.t3news.title'
description: 'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:widgets.t3news.description'
iconIdentifier: 'content-widget-rss'
height: 'large'
width: 'medium'
Options¶
-
refresh
Available -
- Type
- boolean
- Default
false
Boolean value, either
false
ortrue
.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.
:
-
feed
¶Url -
- Type
- string
Defines the URL or file providing the RSS Feed. This is read by the widget in order to fetch entries to show.
-
life
¶Time -
- 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¶
-
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
Button
.Provider Interface See Adding button to Widget for further info and configuration options.