# Nested pages with paths and breadcrumbs in Easy CMS 0.21

> The nested-docs plugin gives each page a parent, a full path and breadcrumbs, and updates the pages below when one moves.

URL: https://easycms.dev/blog/nested-pages-with-paths-and-breadcrumbs  
Published: 2026-09-30  
Updated: 2026-10-29

Most sites have pages inside pages: About, then Team under it. Easy CMS 0.21 adds `@easy-cms/plugin-nested-docs` for that.

```ts
import { nestedDocsPlugin } from '@easy-cms/plugin-nested-docs'

plugins: [nestedDocsPlugin({ collections: ['pages'] })]
```

## What each page gets

- A `parent` field to pick the page above it.
- Its full `path`, such as `/about/team`, per language when the slug is localized.
- Its `breadcrumbs`, ready for navigation and for BreadcrumbList structured data.

## When a page moves

Give a page a new slug or a new parent and the pages under it get new paths too, when it is published. With the redirects plugin, their old addresses redirect to the new ones. A page can't be moved under itself, `maxDepth` limits how deep the tree goes, and a page with pages under it can't be deleted unless you choose `onDeleteParent: 'orphan'`.

## Reading the tree

`findByPath()` finds the page for an address, `getTree()` builds menus, and `GET /api/cms/tree/:collection` gives the same to other frontends. For pages that existed before the plugin, `npx easy-cms nested:rebuild` works out their paths. The plugin adds fields, so create a migration after installing it.

## Also in 0.21

- Relationship `filterOptions`: which documents a relationship may point to, checked on the server; the admin's picker offers only those.
- Slug `uniqueWithin`: slugs unique only among documents with the same value of another field, such as the same parent.
