Nested Docs
Adds parent-child document hierarchies with auto-generated breadcrumbs to Payload collections.
Installation
pnpm add @payloadcms/plugin-nested-docs About
The Nested Docs plugin turns any Payload collection into a page tree. Pick the collection slugs you want to extend and the plugin attaches a `parent` relationship field (placed in the sidebar) and a `breadcrumbs` array field to each one. Editors pick a parent document, and the plugin walks the chain to build and store a breadcrumb trail on every doc. Breadcrumbs are populated in a `beforeChange` hook and written back to the document, so the hierarchy is queryable at read time rather than reconstructed on the fly. An `afterChange` hook resaves child documents when a parent moves, keeping descendant URLs and labels in sync. The parent field's `filterOptions` excludes the current doc and any of its ancestors, which prevents reference cycles. The breadcrumbs field is localized and read-only in the admin UI. Each entry stores a relationship to its document plus a generated `url` and `label`. Both are produced through optional `generateURL` and `generateLabel` functions that receive the full ancestor chain, the current doc, the collection config, and the request, so you control URL and label formatting per project. Configuration is minimal: pass the target `collections` array, and optionally override the `parentFieldSlug` and `breadcrumbsFieldSlug` if your collections already define fields with those names. The plugin can be registered more than once with different collection sets when you need separate trees. It targets Payload 4 (currently published as a beta) and exports a `getParents` helper for fetching the ancestor chain outside the admin context.
Package info
- Package name
@payloadcms/plugin-nested-docs- Latest version
3.88.0- Unpacked size
- 51 kB
- License
- MIT
- Weekly downloads
- 101k
- Last publish
- Aug 11, 2026
More from payloadcms
View profileStripe
Syncs Payload collections with Stripe resources and routes Stripe webhooks and API calls through Payload.
SEO plugin
A plugin to manage SEO metadata from within the Payload admin panel.
Sentry
Integrates Sentry error tracking into Payload applications.
Search plugin
Search plugin for Payload enables fast searching of document records.
Redirects
Manage redirects directly within the Payload CMS admin panel.
Form Builder
Official Payload plugin that lets admins build forms, collect submissions, send templated emails, and optionally process payments or uploads.
Similar plugins
More in ContentMenus
Adds a menus collection to Payload for building navigation with nested items, collection links, custom URLs, icons, and preview images.
Reservation and Booking Manager
Manage reservations and bookings through Payload CMS with conflict detection and scheduling.
Live Preview
Live preview for Payload CMS in Astro and any SSR/static frontend (SvelteKit, Nuxt, Next.js, plain HTML), patching the DOM without rebuilds.
FixedLink
Adds short links on your own domain to Payload documents, with links that keep working after slug changes through the FixedLink service.
Nested Docs Page Tree
Adds a nested tree view for managing documents in Payload CMS.
A/B Testing
A/B testing plugin that creates page variants in Payload collections and routes traffic at the edge via Next.js middleware.