Skip to main content

Themes - Using Content Sources

This document lists Content Sources that are available out-of-the-box with Themes.

Some Blocks specify a specific, named Content Source, and others specify a schema, which allows the user to choose between multiple Content Sources.

Content Sources using the ans-item schema

These Content Sources use the ans-item schema. It's used for a single ANS item - a story, a video, or a gallery.

content-api

Which API and endpoint are used?

Content API - Fetch A Single Document

What parameters are available?

Parameter name

Required or Optional?

Example value

_id

Optional*

LW5LQMYTIFF6VDBN6PECAIVLF4

website_url

Optional*

/gallery/2020/02/06/historic-tour-aboard-the-international-space-station/

*While both _id and website_url are optional, you must enter at least one of them to retrieve an item. If both are entered, _id is used.

How do I use it?

You can provide either the Arc ID or the website URL of the content item.

If your website's URLs change frequently, or if you're curating content across multiple websites where the URLs may differ, then _id is recommended when curating stories (as it does not change, even if the website_url does).

Content Sources using the ans-feed schema

These Content Sources use the ans-feed schema. It's used for a feed for ANS items - a feed of stories, videos, and/or galleries. See also How to Set up a Feed.

content-api-collections

Which API and endpoint is used?

Content API - Fetch A List Of Items From A Collection

What parameters are available?

Parameter name

Required or Optional?

Example value

_id

Optional*

EQ73B3RSGNAFXBR6JF3RNWFT6E

content_alias

Optional*

homepage

from

Optional

0

size

Optional

10

getNext

Optional (defaults to 'false')

true / false 

*While both _id and content-alias are optional, you must enter at least one of them to retrieve a collection.

How do I use it?

Provide either a Collection ID or a Collection Alias to retrieve the Collection. You can optionally select the Offset (from) and number of stories (size) to display.

Set getNext = 'true' to allow for serving additional collection entries, if your size and collection is greater than 10. This will allow up to 20 content entries to display on a list. 

story-feed-tag

Which API and endpoint is used?

Content API - Query For Published Documents.

What parameters are available?

Parameter name

Required or Optional?

Example value

tagSlug

Required

election-2020

feedSize

Optional

20

feedOffset

Optional

0

How do I use it?

See Feed of stories with a tag.

story-feed-author

Which API and endpoint is used?

Content API - Query For Published Documents.

What parameters are available?

Parameter name

Required or Optional?

Example value

authorSlug

Required

carolyn-hax

feedSize

Optional

15

feedOffset

Optional

0

How do I use it?

See Feed of stories by an author.

story-feed-sections

Which API and endpoint is used?

Content API - Query For Published Documents.

What parameters are available?

Parameter name

Required or Optional?

Example value

includeSections

Required

/news

excludeSections

Optional

/news/politics

feedSize

Optional

15

feedOffset

Optional

0

How do I use it?

See Feed of stories in a section

story-feed-query

Which API and endpoint is used?

Content API - Query For Published Documents.

What parameters are available?

Parameter name

Required or Optional?

Example value

query

Required

type:story

size

Optional

5

offset

Optional

0

How do I use it?

See Advanced: Feed of stories from a query

Content Sources using the navigation-hierarchy schema

These Content Sources use the navigation-hierarchy schema. It's used to retrieve a hierarchy from site service.

site-service-hierarchy

Which API and endpoint is used?

Site API - Get The Navigation Tree For A Particular Website.

What parameters are available?

Parameter name

Required or Optional?

Example value

hierarchy

Optional*

hamburger-menu

sectionId

Optional*

/news

*While both of these values are optional, at least 1 must be entered to retrieve information from Site Service. If no hierarchy is specified, the default hierarchy is used.

How do I use it?

This content source has two main use cases:

1) Request a hierarchy (like footer or hamburger-menu) to display in a Block (like the Footer or Navigation)

2) Request a section ID, to get metadata about that section in Site Service, as well as that section's children, to display in the Section Title Block

Additional Content Sources

These Content Sources do not have a schema (they are typically one-off use cases).

alert-bar-collections

Which API and endpoint is used?

Content API - Fetch A List Of Items From A Collection

What parameters are available?

No parameters are available. This Content Source is hard-coded to request an alert-bar collection for the given website, in order to display in the Alert Bar Block.

How do I use it?

This Content Source is only intended for use with the Alert Bar Block. Follow instructions in that block's documentation.

author-api

Which API and endpoint is used?

Author API - List Authors

What parameters are available?

Parameter name

Required or Optional?

Example value

slug

Required

carolyn-hax

How do I use it?

Provide the slug for the author to retrieve their data from the Author Service.

tags-api

Which API and endpoint is used?

Tags API - Return A List Of Only The Tags Specified By Slug

What parameters are available?

Parameter name

Required or Optional?

Example value

slug

Required

election-2020

How do I use it?

Provide the slug for the tag to retrieve its data from the Tags Service.

content-api-unpublished

Which API and endpoint is used?

Content API - Fetch A Single Document

What parameters are available?

Parameter name

Required or Optional?

Example value

_id

Required

HADBIJEFK5G57CXZN7UC7UQHF4

How do I use it?

This content source is only intended to be used to Preview Unpublished Stories from Composer. It is only used in the Preview Unpublished Stories Resolver and should not be used elsewhere, to ensure that unpublished content does not appear on the live website.