# Abstract Document type.
# "Documents" always have a publicly-visible URL.
# Anything page-like (like a blog post) should subclass "Neos.Neos:Document".
'Neos.Neos:Document':
  superTypes:
    'Neos.Neos:Node': true
    'Neos.Neos:Hidable': true
  abstract: true
  constraints:
    nodeTypes:
      '*': false
      # explicitly disallow to create a homepage below a regular document
      'Neos.Neos:Site': false
      'Neos.Neos:Document': true
  ui:
    label: 'Document'
    group: 'general'
    search:
      searchCategory: 'Documents'
    inspector:
      groups:
        document:
          label: i18n
          position: 10
          icon: 'icon-file'
  properties:
    _nodeType:
      ui:
        inspector:
          editorOptions:
            baseNodeType: 'Neos.Neos:Document'
    title:
      type: string
      ui:
        label: i18n
        reloadPageIfChanged: true
        inspector:
          group: 'document'
      validation:
        'Neos.Neos/Validation/NotEmptyValidator': []
        'Neos.Neos/Validation/StringLengthValidator':
          minimum: 1
          maximum: 255
    uriPathSegment:
      type: string
      ui:
        label: i18n
        reloadPageIfChanged: true
        inspector:
          group: 'document'
      validation:
        'Neos.Neos/Validation/NotEmptyValidator': []
        'Neos.Neos/Validation/StringLengthValidator':
          minimum: 1
          maximum: 255
        'Neos.Neos/Validation/RegularExpressionValidator':
          regularExpression: '/^[a-z0-9\-]+$/i'
    _hidden:
      ui:
        reloadPageIfChanged: true
    hiddenInMenu:
      type: boolean
      ui:
        label: i18n
        reloadPageIfChanged: true
        inspector:
          group: 'visibility'
          position: 40
