Implementation of document internationalization and organization of pages in a list item discussed.

8 replies
Last updated: May 19, 2022
Help me implement this:
If I add that code to

export default () => S.list()
    [add here?], <---- Throws error! Expected List item, found Object
May 19, 2022, 6:22 PM
The only thing that can be a direct descendent of
is a
. You'll need to add it before the
export default () => S.list()
         .title('My Schema Type')
         .filter('_id == $id && _type == $type')
            id: 'schemaType',
            type: 'schemaType',
      title: 'Create new',
      intent: {
        type: 'create',
        params: {
          id: 'schemaType',
          type: 'schemaType',
          template: 'schemaType'
May 19, 2022, 6:38 PM
Thank you, Is Working!
Any way to group them?
Let say this is homePage.
Group singleton homePage, aboutPage on a list item called
May 19, 2022, 6:53 PM
Something like this?
Or am I misunderstanding?
May 19, 2022, 7:08 PM
Yes. Applying same logic as above, with singletons
May 19, 2022, 7:09 PM
Ah, got it. In my studio I add them like this:
      .title('Custom Input Examples')
May 19, 2022, 7:15 PM
Have you tried this solution of switching locales? For base locale, it shows perfect, however changing locales shows nothing.
I'm thinking to tweak the first code you gave me:

• Change the GROQ filter to show a list of ID's (homePage, aboutPage), not just one.
• Creating specific menu item for each page, like Create HomePage , Create AboutPage .
May 19, 2022, 7:26 PM
Made it work with tweaks above. Thank you for helping me 🙌
May 19, 2022, 7:50 PM
Awesome! Glad you got it working!
May 19, 2022, 7:51 PM

Sanity– build remarkable experiences at scale

The Sanity Composable Content Cloud is the 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?

Categorized in