order: 2
title: Pages
sections:
  main:
    display: Main
    fields:
      -
        handle: title
        field:
          type: text
          required: true
          validate:
            - required
      -
        handle: front_page_image
        field:
          mode: list
          container: assets
          restrict: false
          allow_uploads: true
          show_filename: true
          max_files: 1
          display: 'Front page image'
          type: assets
          icon: assets
          listable: hidden
          instructions_position: above
          read_only: false
      -
        handle: content
        field:
          type: markdown
          display: Content
          localizable: true
      -
        handle: author
        field:
          type: users
          display: Author
          default: current
          localizable: true
          max_items: 1
      -
        handle: template
        field:
          type: template
          display: Template
          localizable: true
  sidebar:
    display: Sidebar
    fields:
      -
        handle: slug
        field:
          type: slug
          localizable: true
      -
        handle: parent
        field:
          type: entries
          collections:
            - pages
          max_items: 1
          listable: false
          localizable: true
  images:
    display: Images
    fields:
      -
        handle: image_grid
        field:
          collapse: false
          sets:
            new_set:
              display: 'New Set'
              fields:
                -
                  handle: image
                  field:
                    mode: list
                    container: assets
                    restrict: false
                    allow_uploads: true
                    show_filename: true
                    display: Image
                    type: assets
                    icon: assets
                    listable: hidden
                    instructions_position: above
                    read_only: false
                    max_files: 1
                -
                  handle: column_width
                  field:
                    min: 1
                    max: 4
                    step: 1
                    display: 'Column Width'
                    type: range
                    icon: range
                    listable: hidden
                    instructions_position: above
                    read_only: false
                    default: 2
          display: 'Image grid'
          type: replicator
          icon: replicator
          listable: hidden
          instructions_position: above
          read_only: false
