Discussion about accessing document values in deskStructure and using config in Sanity.io

5 replies
Last updated: Jun 16, 2023
Hey palz! I don't seem to be able to access document in its entirety on deskStructure, as seen in the image below:the object just returns the type and publishedAt, nothing else.
Jun 15, 2023, 4:47 PM
user L
, not quite sure what you're expecting here? What shows in the preview iframe would be the responsibility of your website app, no?
I'm presuming what shows on the Editor tab is normal, yes?
Jun 15, 2023, 8:38 PM
Since you’re doing this in the context of the Structure, the only thing your url callback has access to are the things you’ve passed in to the child function. In this case, the
of the item, the schema type, and the title of the pane. The
don’t even necessarily correspond the the values in your document since they’re determined by what you’ve specified in your structure.
If you want access to all of the values of the document, the easiest way by far would be to do so in your
config .
Jun 15, 2023, 10:12 PM
user M
emojis need a 'proper nod' (of head) choice, for sure 🙂
I did think a moment on this path, but wasn't sure how Joao would be using it. You are very clear, should cover a lot of possibilities....
Jun 16, 2023, 12:11 AM
user Q
Jun 16, 2023, 12:18 AM
Many thanks for your suggestions, managed to get it working 🙂
Jun 16, 2023, 1:41 PM

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?