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

collections repeated #2289

Closed
lpluispacheco opened this issue Apr 14, 2019 · 6 comments
Closed

collections repeated #2289

lpluispacheco opened this issue Apr 14, 2019 · 6 comments

Comments

@lpluispacheco
Copy link

Hi,

When i try to see in /admin my collections are displayed with the same name, this is my config

collections:

  • name: "en"
    label: "EN"
    files:
    • name: "header"
      file: "src/intl/en.json"
      label: "Header section"
      fields:

      • { label: Title, name: header-section.title, widget: string }
    • name: "Header Section"
      file: "src/intl/en.json"
      label: "Section One"
      fields:
      - { label: Title, name: section-one.title, widget: string }

    • name: "Header Section"
      file: "src/intl/en.json"
      label: "Section Two"
      fields:
      - { label: Titulo, name: section-two.title, widget: string }

A solution that I've to make is create it separated like this:

collections:

  • name: "header"
    label: "Header"
    files:

    • name: "header"
      file: "src/intl/en.json"
      label: "Header section"
      fields:
      • { label: Title, name: header-section.title, widget: string }
  • name: "sec1"
    label: "Section One"
    files:

    • name: "sec-one"
      file: "src/intl/en.json"
      label: "Sec One"
      fields:
      • { label: Title, name: section-one.title, widget: string }

I'm creating different sections because I'm creating a multi lang page with Gatsby and I need to separate it in sections like: 'EN', 'ES'..

Any ideas?

Thanks!

@erquhart
Copy link
Contributor

You have the same file for every entry, `src/intl/en.json’.

Sent with GitHawk

@lpluispacheco
Copy link
Author

Hi @erquhart, yes I have the same file to each entry, 'src/intl/en.json'

@erquhart
Copy link
Contributor

erquhart commented May 9, 2019

Sorry should have been more clear: that's the problem, you can only have one file per entry.

@lpluispacheco
Copy link
Author

Sorry should have been more clear: that's the problem, you can only have one file per entry.

Thanks, do you have any solution for this?

Or even can I create like separators in the left menu? To create something like this:

EN

Home
Services
Contact

ES

Home
Services
Contact

FR

Home
Services
Contact

Or if you have another idea would me great, thanks!

@erquhart
Copy link
Contributor

erquhart commented May 9, 2019

Check #716 for some ways folks are handling this.

@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.

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

3 participants