-
-
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
Nested field access in name #595
Comments
Providing more control over the data model makes sense, agreed. Just need to figure out how the api should work, I think we can do better than dot notation (but maybe not?). |
If I understand this correctly, adding this feature could help clean up the editor experience quite a lot. Say I have the following front matter on some Hugo pages.
Setting this one integer value per page will determine both the sort order and whether the page is included in Hugo's built-in nav system. Hugo will take care of the rest using the page title as the default label for each entry and auto-generating the relative links. Now someone please correct me if I am wrong, but to make this one field editable in NetlifyCMS, I believe I need something like the following in config.yml:
This will yield a three layer deep nested object UI in NetlifyCMS to edit one single field, which will also look about as hideous as it sounds. |
+1 for this issue. Not being able to nest fields is a big UI / UX issue in my opinion. |
And it should be quite easy to implement with a library like https://github.com/developit/dlv or https://github.com/robinvdvleuten/shvl. |
We're already including Lodash, so I'd expect we go with |
@erquhart is this something we could have a fix for in 2.0? I know the status of this is "accepted"and I saw there's a some open projects to rework the API, but didn't see something that explicitly mentions this type of functionality. |
If someone wants to take it on, we're open to a PR. We'd need to map when writing and also reverse map when reading, and ensure graceful handling of collisions. That said, I'd say this is ready for development. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
It would be very nice to have the possibility to have nested fields access in field names.
Currently when I am configuring a nested field like this;
It gives me the following;
But if would be nice if I can just do this;
And having this output;
The text was updated successfully, but these errors were encountered: