Panel, section, column and toogle

Hi,

I don’t understand how to add a “toogle” under a page list. Here is my .yml.

title: Site

columns:
  - width: 1/2
    sections:
      posts: sections/posts
      type: fields
        fields:
          toggle:
            label: Toggle
            type: toggle
            text: Something ?  

  - width: 1/2
      sections:
        pages:
          type: pages
          templates:
            - album
            - default
            - posts

You have to create a new fields section:

columns:
  - width: 1/2
    sections:
      posts: sections/posts
      fields:
        type: fields
        fields:
          toggle:
            label: Toggle
            type: toggle
            text: Something ?  
1 Like

Ok, it’s work — thank you.
Not easy to understand the 3 fields !

True!

You can name the section anything, you don’t have to call it fields, it will still leave you with two “field” thingies:

columns:
  - width: 1/2
    sections:
      posts: sections/posts
      supersection: # the name of the section
        type: fields # the type of the section
        fields: # the keyword that starts your list of fields
          toggle:
            label: Toggle
            type: toggle
            text: Something ?  
2 Likes