Unlock seamless workflows and faster delivery with our latest releases- get the details

any hints on creating a group of singletons in structure builder?

3 replies
Last updated: Jan 14, 2021
any hints on creating a group of singletons in structure builder?
Jan 14, 2021, 2:24 AM
i usually do something like this..
S.listItem()
        .title('Pages')
        .icon(Pages)
        .child(S.list().title('Pages').items(pages)),
and then make an array of all of your singleton (in this case page) types..

[S.documentListItem().schemaType('aboutPage').id('aboutPage'), ...]
Jan 14, 2021, 2:58 AM
awesome, thanks for the tip!
Jan 14, 2021, 3:04 AM
of course!
Jan 14, 2021, 3:04 AM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?