Where should I store global data?

Hello community,

I was asking myself, where I should put global data like address, etc. When I try to extend site.yml with fields, the page administration doesn’t show up in the dashboard anymore.

Thank you very much.
Best,
Timo

The site would be the right place for this. To achieve this, you’d probably best use tabs to separate data, and inside the tabs you can use fields or sections.

title: Site

tabs:
  general:
    label: General information
    columns:
       # Rest of layout
  content:
    label: Content
    columns:
      # Rest of layout
3 Likes

Okay. Just to sure. The site.yml located under ./site/blueprints/site.yml
The file currently contains:
title: Site
preset: pages
unlisted: true

And this would be extended with:

tabs:
  general:
    label: General information
    columns:
      # Rest of layout
  content:
    label: Content
    columns:
      fields:
        what:
          label: What
          type: text
      # Rest of layout

It won’t work with the preset, rather like this:

title: Site

tabs:
  general:
    label: General information
    columns:
      column1:
        # Rest of layout
  content:
    label: Content
    columns:
      main:
        fields:
          what:
            label: What
            type: text
      # Rest of layout

@texnixe:

I think in the file site.yml we need a part like

columns:
  - width: 1/3
    sections:
      parts:
        headline: Pages
        type: pages
        status: all # is default
        create:
          - default

to show some pages.

1 Like

@anon77445132 yours actually worked.
I did

title: Site
tabs:
  general:
    label: General information
    columns:
        - width: 3/3
            sections:
               drafts:
                  headline: Drafts
                  type: pages
                  status: draft
                  create:
                     - default
  content:
      label: Content
      columns:
        main:
            fields:
               what:
                  label: What
                  type: text
  # Rest of layout

Thanks everybody for your help! Much appreciated :slight_smile:

But I think you need more than

If you only set this, you never see a listed page.

If you have only ONE section with pages you have to change or delete this line.
Or add at least another pages section with another status.

@anon77445132 Yep, of course! Sorry to not mention this.
There are two more sections. One for unlisted pages and one for listed pages.

And if you leave out the create -default, a user will be able to select from defined template types.

1 Like