question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feat: support hidden widget in files collections

See original GitHub issue

Repo: chokeul8r/gncms

I am attempting to use NetlifyCMS in a Gatsby Landing Page project for the first time. My problem relates to the config.yml file and Template key field in particular. The template key is not showing up in my frontmatter and/or my graphgl query.

backend:
  name: git-gateway
  branch: master

media_folder: static/assets
public_folder: assets

collections:
  - label: "Pages"
    name: "pages"
    files:
      - label: "Home Page"
        name: "home"
        file: "content/home.md"
        fields:
          - {
              label: "Template Key",
              name: "templateKey",
              widget: "hidden",
              default: "home-page",
            }
          - { label: Background Image, name: backgroundimage, widget: image }
          - { label: Title, name: title, widget: string }
          - { label: Sub-Title, name: subtitle, widget: string }
          - { label: Intro text, name: intro, widget: text }
          - { label: Body text, name: body, widget: text }
          - { label: Profile Image, name: profileimage, widget: image }
      - label: "Thank You Page"
        name: "thank-you"
        file: "content/thank-you.md"
        fields:
          - {
              label: "Template Key",
              name: "templateKey",
              widget: "hidden",
              default: "thank-you-page",
            }
          - { label: Title, name: title, widget: string }
          - { label: Intro text, name: intro, widget: text }
          - { label: Image, name: image, widget: image }

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:8
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
alexis-regnaudcommented, May 2, 2021

What was the solution for that one ? I have the same problem on my side, the Collections works well, but I get a templateKey : null for my Files.

In that exemple : https://github.com/robertcoopercode/gatsby-netlify-cms/blob/master/static/admin/config.yml They use it, but seems doesn’t work at all on my side 😕

1reaction
abdullahecommented, Jul 21, 2020

Thanks @erezrokah. This method is a bit beyond my capabilities for now. 😃 I added a select widget and a minor inconvenience to the user.

Read more comments on GitHub >

github_iconTop Results From Across the Web

hidden | Open-Source Content Management System
Hidden widgets do not display in the UI. In folder collections that allow users to create new items, you will often want to...
Read more >
Set showFirstLast to false when pages of collection are less ...
Quite a simple one, when there is only one page hide the pagination else it looks a little silly just sitting... ❔ Question....
Read more >
iOS 16 - New Features - Apple
View widgets in a textual, circular, or rectangular format near the time to get information like weather conditions or progress on your goals....
Read more >
If You Got a New iPhone With iOS 16, Immediately Do These 3 ...
Before you get into all the hidden features or most annoying ... do first before anything else, to help improve your iPhone experience....
Read more >
SiteOrigin Widgets Bundle – WordPress plugin
Our collection is growing; here's what we have so far: ... Insert widgets using the SiteOrigin Widgets Block featuring a live widget search...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found