Skip to content

n syndication icons display library

D Budge edited this page Oct 15, 2021 · 3 revisions

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.

syndication_symbols.png

On clicking on the green tick icon, the user can save or download the content

syndication_modal.png

What it does

  • 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.

get_content_ids_snippet.png

  • Passes them to next-syndication-api to get the syndication data for each content ID according to what this user's contract specifies.

syndication_api_response_snippet.png

  • Uses the response to put the syndication symbols

  • When a user then clicks a syndicator icon, a modal is displayed with save and/or download buttons enabled/disabled, along with the appropriate messaging, also according to the user's contractual rights.

Display Syndication Icons on FT.com diagram

syndication icons diagram

Flags

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.

Clone this wiki locally