Blueprint for bloglike page with a short intro

Can I not make a field for a short intro and then a bloglike section? Why is this wrong:

title: Museum
icon: document

sections:
  Einleitung:
    label: Kleiner Einleitungstext
    type: textarea
    size: medium
     
    drafts:
      headline: Entwürfe
      status: draft
      type: pages
      template: museumspost
    
    unlisted:
      headline: Zur Abnahme
      type: pages
      status: unlisted
      template: museumspost
     
    listed:
      headline: Veröffentlicht
      status: listed
      type: pages
      template: museumspost

I have been at this point a lot of times and I don’t understand why this should not be possible.

Doesn’t matter the indentation, it seems that I can’t combine these sections.

But what if I need a page with a short introduction to a topic and then a list of entries? It is not so strange a thing, is it?

first of all, your indentation is off.
Secondly, Einleitung is not a section but a field, and you cannot mix sections with field. So that means you have to put this textarea field within a fields section.

sections:
  fields:
    type: fields
    fields:
      einleitung:
        label: Kleiner Einleitungstext
        type: textarea
        size: medium
     
  drafts:
    headline: Entwürfe
    status: draft
    type: pages
    template: museumspost
    
  unlisted:
    headline: Zur Abnahme
    type: pages
    status: unlisted
    template: museumspost
     
  listed:
    headline: Veröffentlicht
    status: listed
    type: pages
    template: museumspost

Always use two spaces for each indentation level and make sure that the same things are on the same level.

With the setup above, you now have 4 sections:

  • 1 fields section called fields with one field
  • 3 pages sections

See, something like this drives me nuts. It looks redundant to me. And then, why do I need sections? It is just those fields on top of each other.

PS: The equivalent to a boy scout in tech as texnixe: Save an idiot every day.

Thank you.

If you only use fields, you don’t need the additional sections level. In your case drafts, unlisted and listed are sections (of type pages). Therefore you need to wrap your fields in a section, too (type fields).

The first fields in your example is the identifier of the fields section, this could also be myFields or anything else. The second declares the type of this section and the third lists the included fields.

I agree, this is confusing at first. But once you get used to it, it’s no problem anymore.

Thank you for that explanation! I guessed that the identifier for the section could be another name, but after type: fields - what else could stuff be that comes after that, than …fields? So why can’t it be the names of the fields? Why must there be the - second identifier that says fields?

Anyway, its just me.