-
Notifications
You must be signed in to change notification settings - Fork 0
n syndication icons display library
This is the client-side library responsible for adding syndication symbols next to article/podcast and video headlines on ft.com, allowing syndication customers to download or save content for republishing.
Github repo: https://github.com/Financial-Times/n-syndication
The symbols indicates different syndication grants. The grants are set by data in the Content API and Syndication API.
On clicking on the green tick
icon, the user can save or download the content
- Checks if logged in user is a syndication user (see authentication wiki page)
- Gets all the
contentIds
from the DOM by querying for all the[data-content-id]
attributes in each n-teaser.
- Passes them to next-syndication-api to get the syndication data for each content ID according to what this user's contract specifies.
-
Uses the response to put the syndication symbols
-
When a user then clicks a syndicator icon, a modal is displayed with
save
and/ordownload
buttons enabled/disabled, along with the appropriate messaging, also according to the user's contractual rights.
The syndication
flag must be on for the icons to show.
When the maintenance mode syndicationMaintenance
flag is on, all icons will show as red crosses.