decaporg / decaporg/decap-cms

Allow nesting collections

Open
#4,459 0 comments 0 reactions 0 assignees View on GitHub
type: feature
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

This feature request is closely related to https://github.com/netlify/netlify-cms/issues/2056 but I think it's not exactly the same.

I want users to be able to create new pages of the same type (let's say "offices") inside others that should be dynamically created too (countries for example).

So I want users to be able to create new countries with new offices inside:
```
- USA
- Seattle
- New York
- Spain
- Madrid
- Barcelona
```

I want to let my users to create new countries at any time, so I can't anticipate how many countries there are in advance to create different collections for each of them.

I've tried to solve this using relations between different collections "countries" and "offices" but even with this beta feature:
path: '{{year}}/{{slug}}' you can't use fields (or relations) as part of the path (it creates a {{country}} folder in that case) as long as I know.

I can live with all offices together in the backend, but at least I'd like to have comprehensive urls like usa/seattle and spain/barcelona.

Am I missing something or is this not possible yet?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.