Build with Sanity MCP in Replit. Prizes up for grabs! Submit by June 14

Building a Tree of Pages - Is there a Way to Show the List of Children Nodes and Edit View?

2 repliesLast updated: Apr 22, 2022

Hi there, I'm building a tree of pages, is there a way in the structure builder, a node of my tree can be just a level of the hierarchy and have also an edit view? so on click I show the list of children nodes but also the edit view for that node?
((I am still learning structure, so forgive the rough code that I’m sure can be optimized quite a bit)) - I broke out the mainCompany variable so the other devs working on this project could more easily enter a different document by title without having to know strucutre builder methods, with a rough plan to break this and similar values out into an imported constants list for them.
cool thanks for that, it feels like what I am after is doable, I just need to play with structure builder and go beyond what's in the documentation.

Was this answer helpful?

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Related contributions