# The page tree

How editors create, arrange and remove pages in the admin, and what your configuration allows them to do.

## The list

*Pages* shows every page as a tree: a row per page, indented under its parent, with its title, its URL, its page type and its status. A multilingual site has a language picker at the top; the tree's shape is shared across languages, and a page that does not exist in the selected language is dimmed. [Languages](https://smoodly.io/docs/languages/locales.md) covers that side.

Clicking a page opens the editor. Clicking a path expands it.

## Creating pages

*+ New page* asks for a slug, then for the page type when more than one open type is registered, and opens the new page in the editor. Its title starts as the slug until an editor renames it.

*+ New path* creates a path: an item that groups pages under a shared part of their URL and has no page of its own. A row's ⋯ menu offers *New subpage* and *New subpath* under that row, and *Add page here* turns a path into a page by giving it a page type.

How deep the tree may go is config. Without a setting, pages sit side by side at the root. The starter allows three levels:

File: `smoodly/config.ts`

```ts
export const config = defineConfig({
  // …
  pages: { tree: { depth: 3 } },
  // …
});
```

The home page never has children, so a site's pages start at the root beside it.

## Moving pages

Editors drag a row by its grip to reorder it among its siblings, or to move it under another parent. The page's URL follows, because a URL is derived from the page's place in the tree. On a multilingual site a page moves only under a parent that exists in every language the page exists in, and the order is the same in every language unless the config sets [`locales.order`](https://smoodly.io/docs/languages/locales.md#one-order-or-one-per-language) to `"perLocale"`.

## Pages you own

Two kinds of rows are code-owned and cannot be renamed, moved or deleted: fixed pages, from page types with a `slug`, and collection mounts, from collections with a `path`. Smoodly creates both on the first admin load, so they are there before an editor arrives.

A mount is the collection's place in the tree. When a fixed page claims the same slug, as the starter's Articles index does, the mount row is that page and opens its editor. Without one, the row opens the collection's list.

Code-owned rows always sit at the root, even when their URL has several parts: the starter's News row shows `/company/news` next to the editors' *Company* page. A row marked *No longer in code* is a page whose registration was removed; delete it. A notice under a page's title means visitors get your code's page at its address instead; rename or move it. [Paths and slugs](https://smoodly.io/docs/pages/paths-and-slugs.md#urls-your-code-owns) covers both.

## Renaming, duplicating and deleting

*Rename…* in the ⋯ menu asks for the title and then the slug, in the selected language. The home page takes a title only; its slug is the config's `homePageSlug`.

*Duplicate…* asks for a title and a slug and makes a new draft page beside the original, with a copy of its sections, page fields and SEO in the selected language. It appears on pages whose page type editors can create; a code-owned page has one address and cannot be duplicated.

*Delete* removes the page in every language, after a confirm. It appears only on a page with no children: move or delete the children first.

Next, [Paths and slugs](https://smoodly.io/docs/pages/paths-and-slugs.md) explains what makes a valid URL.
