Documents Pane Plugin: GROQ query results inside View Pane

Written by Kapehe

Ever needed to show editors a list of documents next to where they are working? The new Documents Pane has you covered. Use it for listing things like incoming references, image asset data like size or color palette, or list other documents within the same category.

Created by Simeon Griggs, the Documents Pane plugin can be found on the Sanity Exchange under Tools & Plugins..

What is Documents Pane?

When on an editable view in your Studio, the Documents Pane plugin will show the results from any GROQ query you declare within your desk view. In this guide, we'll look at a query that pulls out all the references to a certain document.

When in the Studio, an "Incoming References" tab will show a list of items for all the referenced items:

Documents pane showing incoming references GROQ query results in the Sanity Studio

Let's break this down. We are in the editor for "Gummy Worms" which is one of the Products within this Studio's Content Lake. By clicking on "Incoming References", a new pane pops up to the side and displays all the incoming references for that particular document. In this case, Gummy Worms is being referenced on the Home Page and in 2021's Best Candy.

Installing the Plugin

To get this plugin into your own Studio, navigate to the project and run the following command:

Internal server error