Skip to content
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

Auto Incrementing Numbers #2367

Open
zaneadix opened this issue Jun 9, 2019 · 4 comments
Open

Auto Incrementing Numbers #2367

zaneadix opened this issue Jun 9, 2019 · 4 comments

Comments

@zaneadix
Copy link

zaneadix commented Jun 9, 2019

Is your feature request related to a problem? Please describe.
Auto-incrementing number fields. As items are added to a collection the default number value is incremented.

Describe the solution you'd like
Number widgets could have an auto-increment parameter?

Describe alternatives you've considered
If it's possible to implement this as a custom widget, I'd be more than happy to do that but I've been digging through widget props and some source code an am not sure if there's anything I can leverage to accomplish this.

Additional context
I'm using netlify-cms to manage a podcast and need episode numbers. I was going to just set them in the rss feed as I iterate over the episodes (just set the index) but this wouldn't be reliable in the case that an episode gets deleted at some point

@erquhart
Copy link
Contributor

The challenge here is reading the number field from every other entry in the collection, data that widgets don't currently have access to. This should be made possible, though.

@stale
Copy link

stale bot commented Oct 29, 2019

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.

@stale stale bot added the wontfix label Oct 29, 2019
@stale stale bot removed the wontfix label Oct 29, 2019
@erquhart
Copy link
Contributor

The other challenge is when using the editorial workflow, and multiple unpublished entries have an incrementing field, its value really needs to be set at publish time (#1348).

@eduncan911
Copy link

subscribing... currently converting our site with about 1400 pieces of different content, and everything is key'd via auto-incrementing IDs in the URLs.

I can't ask the admins to "pick a number" in the CMS. Doh.

Right now, I think I am going to have to fake a lot of the numbers in loops with int++. Thing is, some items are hidden and the numbers are consecutive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants