Using FeedManager
FeedManager is the runtime of the feeds addon — it pulls structured data from external feeds (earthquake catalogs, alert feeds, any JSON/GeoJSON endpoint) on a schedule and makes the records available on your pages, without creating one page per record. The data lives in a record store and refreshes on its own; your page just displays the latest.
The feeds addon is disabled by default. An administrator must enable it and configure at least one source before anything renders.
Enabling (administrators)
Add flat config keys to the instance's custom configuration (or via the admin configuration UI):
ngdpbase.addons.feeds.enabled: true
ngdpbase.addons.feeds.sources.usgs-quakes.adapter: geojson
ngdpbase.addons.feeds.sources.usgs-quakes.url: https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson
ngdpbase.addons.feeds.sources.usgs-quakes.type: Event
ngdpbase.addons.feeds.sources.usgs-quakes.intervalMinutes: 30
Each source needs adapter, url, and type. Optional: intervalMinutes or dailyAt (schedule), recordIdField, itemsPath and map (field mapping for rest-json).
Available adapters today: geojson (GeoJSON FeatureCollections), rest-json (generic JSON endpoints), and xml (generic XML documents — attributes are addressed as element.@attribute, element text as element.#text). More formats (RSS/Atom, CSV) are planned.
Showing feed data on a page
A table of records — DataFeedPlugin
[{DataFeed source='usgs-quakes'}] renders the source's records as a sortable table. Useful parameters:
columns='place,magnitude,depth_km'— pick which record fields to showsort='magnitude-desc'— sort by a fieldmax='10'— cap the row count (default 20)format='list'— a simple bullet list of record names instead of a tablebadge='color'— render listed columns as colored pills (built-in styles for GREEN / YELLOW / ORANGE / RED values)link='volcano=https://example.org/v/:gvp'— make a column a link, filling:placeholdersfrom the record's other fields (use:namestyle — curly braces cannot appear inside a plugin tag)
Example:
[{DataFeed source='usgs-quakes' columns='place,magnitude' sort='magnitude-desc' max='10'}]
If the addon is disabled or the source is unknown, the plugin shows a muted placeholder instead of an error.
A scrolling one-liner — MarqueePlugin
The latest records can run as a banner without any feed-specific plugin:
[{MarqueePlugin fetch='FeedManager.toMarqueeText(source=usgs-quakes,max=5)'}]
Good to know
- Records refresh on the configured schedule with automatic back-off when the upstream feed is down; a stale feed logs a warning for the administrator.
- Feed records also appear in the platform catalog as CreativeWorks, so other features can discover them.
- Feed data is display-only on pages — editing a page never edits the upstream records.
See Plugins for the complete plugin list.
No comments yet.