-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18n: support "duplicate" setting on list fields #4386
Comments
The challenge here was to mirror the widget behaviour in the side by side editor, so it was postponed as a part of the original PR. |
I just realized that even other widgets are not storing anything in my frontmatter with |
The |
@barthc Ah, you're right, it does work. I probably messed something up by changing a field form |
@barthc Ok I figured out the My config.yml: ...
i18n:
structure: multiple_files
locales: [en, de]
default_locale: en
collections:
- name: content-pages
label: Content Pages
folder: content/pages
create: true
i18n: true
fields:
- {label: Template Key, name: templateKey, widget: hidden, default: content-page, i18n: duplicate}
- {label: Title, name: title, widget: string, i18n: true}
- {label: Image, name: image, widget: image, i18n: duplicate, required: false}
- {label: Body, name: body, widget: markdown, i18n: true} After creating a new page in netlify-cms, I get two new markdown files in content/pages. ---
templateKey: content-page
title: test
image: /img/test.png
---
test body and test.de.md: ---
title: testfoo
image: /img/test.png
---
test inhalt In my previous test I had a collection with |
It's a same issue as #4356 Workaround is to change hidden widget to string widget and also remove default settings value. Then input "content-page" into the string widget. |
Any timeline for this feature? |
The best way to move this forward is to submit a PR for it @gimyboya |
Any progress here? |
Currently, list fields only support
i18n: true
andi18n: false
. For many cases (like a picture carousel) the content needs to be the same among all locales, wherei18n: duplicate
would make sense.Possible workarounds are using a relation widget and storing the content in a separate collection or setting
i18n: false
and fetching it from the default locale manually. This is less intuitive for either the editors or the developer.The text was updated successfully, but these errors were encountered: