Fields not showing in admin panel for some pages


#1

So I have created a field group and included it in some select pages. It is showing in the admin panel for some pages but not others.

fields/navigation.yml

type:             group

fields:
    menuinclude:
        label:
            en:   Include In Top Navigation?
            de:   Include In Top Navigation?
        type:     checkbox
        width:    1/3

    menuname:
        label:
            en:   Top Navigation Title
            de:   Top Navigation Title
        type:     text
        width:    2/3

This is working for the about page but not the blog page for example.

about.yml

title:
    en:          About
    de:          Über uns

pages:
    template:    team
    num:         zero

files:           false

options:
    template:    false
    status:      false

fields:
    title:
        label:
            en:  Title
            de:  Titel
        type:    title

    intro:
        label:
            en:  Intro
            de:  Einleitungstext
        type:    textarea

    text:
        label:   Text
        type:    textarea

    navigation:
        extends: navigation

blog.yml

title:           Blog

files:           false

pages:
  template:      article
  sort:          flip
  num:           date

options:
  template:      false
  status:        false

icon:            newspaper-o

fields:
  title:
    label:
      en:        Title
      de:        Titel
    type:        title
    required:    true
    width:       3/4

  perpage:
    label:
      en:        Posts per page
      de:        Beiträge pro Seite
    type:        number
    min:         1
    max:         20
    default:     5
    width:       1/4
    translate:   false # Do not translate the perpage setting
    help:
      en:        This setting can only be changed in the default language.
      de:        Diese Einstellung kann nur in der Standardsprache geändert werden.


  text:
    label:       Text
    type:        textarea

  info:
    label:
      en:        Hint
      de:        Hinweis
    type:        info
    text:
      en:        >
        The blog page fetches its subpages and displays them as blog posts.
        To fill the blog page with content, just hit the <b>Add</b> button
        to create a new article. Your blog articles will be automatically ordered by
        date.
      de:        >
        Die Blogseite holt sich alle ihre Unterseiten und stellt diese als
        Blogbeiträge dar. Um die Blogseite mit Inhalt zu füllen, klicke
        bitte auf den <b>Hinzufügen</b>-Button in der Seitenleiste. Die
        Artikel werden automatisch nach Datum sortiert.

    navigation:
        extends: navigation

Am I missing something? Why does the field display for some pages in the admin panel but not others?


#2

I can’t tell from what you have pasted above, but very likely an indentation problem. Make sure that you only use spaces for yaml indentations and that all these indentations are correct.


#3

Ah right OK.

So I just tested this. You can use tabs or spaces as long as the whole document is the same. I had simply just added the new field group at the end that was tab spaced and the rest of the document was 2 space spaced, so it didn’t work. After changing the tabs to 2 spaces it showed, then I changed the whole document to be tab spaced and it also worked.

Many thanks yet again.