Structures
A structure is a tree — nested items you rearrange in the Control Panel. That tree either owns a collection’s URLs or powers a freestyle nav. Same shape, two jobs.
Overview#
Statamic uses trees whenever order and nesting matter. A structure is the thing that holds that tree.
Every structure is a hierarchy of branches. What differs is what the hierarchy is for:
- Structured collections — the tree is the content hierarchy. Nesting and order drive URLs (and sibling order). Your sitemap lives on the collection.
- Navigations — the tree is a menu. Mix entry references, hard URLs, and text nodes. Position in the tree does not rewrite entry URLs.
Same drag-and-drop UI. Same YAML tree shape. Different jobs.
When to use which#
Use a structured collection when:
- Nesting should mean something in the URL (
/about/teamlives under/about) - An entry should appear only once in the hierarchy
- Rearranging items should change where people land
- You're building a classic pages area — home, about, children, the usual suspects
Use a navigation when:
- You're building a header, footer, sidebar, or mega-menu
- The same entry might show up more than once
- You need section labels, external links, or anchor links mixed in
- Menu order should be independent of URL structure
Use both when a pages collection owns the URLs and one or more navs compose what appears in chrome. That's normal — not overkill.
| Structured collection | Navigation | |
|---|---|---|
| Owns URLs | Yes — position drives routes | No — entries keep their collection URLs |
| Entry once | Yes | No — can repeat |
| Freeform links / text | Entry-link redirects (via collection settings) | Yes — URLs and text nodes |
| Config lives in | The collection itself | content/navigation |
| Tree lives in | content/trees/collections |
content/trees/navigation |
Structured collections#
Turn on Orderable on a collection and Statamic wires up a structure under the hood.
- You can only add entries from that collection
- Order and nesting dictate URLs (via
parent_urianddepthon the collection's route) - You can place an entry only once
- You can create internal and external redirects (when enabled on the collection)
- Max depth, root pages, mounting, and route patterns are collection concerns
Operational details — root page, constraining depth, redirects, mounting — live in Collections → Ordering.
Navigations#
A nav is a freestyle structure for menus and other chrome. It does not own content URLs.
- Reference entries, hardcode URLs (internal or external), or use text-only nodes (section labels for dropdowns, etc.)
- Choose which collections' entries appear in the picker
- Referenced entries keep the URLs defined by their collection, regardless of position in the nav
- The same entry can appear multiple times
- Storage layout, blueprints, and localization are covered in Navigation
The tree#
The tree is the array that defines the hierarchy. Each item is a "page" branch.
tree:
-