Skip to content

Research

When a Research item is published or updated in Sanity, the system fetches type-specific fields in addition to the general variables. Research records follow a simple pattern similar to News and Publications.

Source file: algolia/custom_actions/types/getResourcesData.js


FieldSourceDescription
dateprops.draft?.attributes?.datePublication date of the research item
organizersprops.draft?.repeater[]List of authors/contributors (title only, no images)

date = props.draft?.attributes?.date

The organizers are built from a repeater field in the Sanity document. Each entry contributes a title but no image:

for (let i = 0; i < props.draft?.repeater?.length; i++) {
organizers.push({
title: props.draft?.repeater[i].title,
image: false
})
}

This pattern is shared with News and Publications.