🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

Reordering documents in Sanity using `deskStructure` and `orderings`

12 replies
Last updated: Apr 19, 2020
Is there a way to have the list of documents be reordered by dragging them up or down. Is the only way to order the documents by putting a order ID and then changing the orderBY to that ID either asc or des
Apr 19, 2020, 6:51 PM
more context?
If its in the document list, you can use the
to order them, group them, etc
Apr 19, 2020, 6:52 PM
For the list of Flooring Tiles, is there a way to have the user drag and reorder them? Instead of having to assign ID's to each and reorder by that manually.
Apr 19, 2020, 6:56 PM
why would they want to reorder them? does that somehow change the frontend?
Apr 19, 2020, 6:57 PM
you can use the
to set up your own custom orders
Apr 19, 2020, 6:57 PM
but there is no “drag and drop” option… again, not really sure what the would accomplish
Apr 19, 2020, 6:58 PM
ok no problem, I was using datoCMS for another project, and you could drag and drop orders of projects which would update a order property in graphql which was super helpful to have a certain item show up higher on the page if you wanted to feature it first
Apr 19, 2020, 6:59 PM
it will work without drag and drop to tho, thanks
Apr 19, 2020, 6:59 PM
I just know, down the road some is gonna ask, how to we put Hardwood infront of Tile so on. So I need it to be simple of enough to change that ui from sanity
Apr 19, 2020, 7:01 PM
i don’t think changing the
actually changes how you get them in graphql
Apr 19, 2020, 7:02 PM
that could be done in the query itself though
Apr 19, 2020, 7:02 PM
just choose what you want to sort by, pretty straight forward
Apr 19, 2020, 7:03 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?