I18n + nested collections doesn't show the entire collection
- Dominant language
- JavaScript
- Stars
- 19.4k
- Forks
- 3.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
**Describe the bug**
I’m trying to set-up Netlify CMS with i18n (en + es) and nested collections.
As both seem to be beta features, I’m not sure if this would even work together.
Hope to get some thoughts on this.
I’ve created a demo repo, with a basic configuration that I believe should work.
The CMS however only shows the first content item.
If I understand it correctly;
The title is usually used for the slug, but with i18n I want different titles for each language.
The identifier field is therefore used for consistency between the two.
The meta path is used to specify the (sub-)folder.
See screenshots, config, and demo repo below.
**To Reproduce**
See demo repo: https://github.com/wslyvh/cms
**Expected behavior**
All content pages are shown properly in the collection tree.
**Screenshots**
https://aws1.discourse-cdn.com/netlify/optimized/3X/c/7/c722701eba0108a017372790c65e9392ed9c69c0_2_1380x658.jpeg
**Applicable Versions:**
- "gatsby-plugin-netlify-cms": "^4.4.0"
- "netlify-cms-app": "^2.13.3"
- Git provider:GIthub
- OS: Mac
- Browser version Brave
- yarn version v1.22.10
**CMS configuration**
```yaml
backend:
name: github
repo: wslyvh/cms
branch: main
# publish_mode: editorial_workflow
media_folder: static/assets/uploads/images
public_folder: /assets/uploads/images
i18n:
structure: multiple_folders
locales: [en, es]
default_locale: en
collections:
- name: 'pages'
label: 'Pages'
label_singular: 'Page'
folder: 'src/content/pages'
identifier_field: identifier
create: true
i18n: true
nested:
depth: 100
fields:
- { name: 'identifier', label: 'id', widget: 'string', i18n: 'duplicate' }
- { name: 'title', label: 'Title', widget: 'string', i18n: true }
- { name: 'body', label: 'Body', widget: 'markdown', i18n: true }
- { name: 'order', label: 'Order', widget: 'number', i18n: 'duplicate', required: false, value_type: 'int', min: 1, max: 1000, step: 1 }
meta: {
path: {
name: 'path',
label: 'Path',
widget: 'string',
i18n: false,
index_file: 'index',
hint: 'Path can be a sub-folder (e.g. main/sub)'
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.