Search code examples
neoscms

Neos CMS: Extending page properties for the backend


Is it possible to have a checkbox in the Neos backend for every page to show/hide some HTML and JavaScript code in the page (and even better also for all sub pages)?


Solution

  • You can add anew property for Neos.Neos:Document or create a new type and then attach it as superType to every page type you want.

    Sample settings for Neos.Neos:Document:

    'Neos.Neos:Document':
      ui:
        inspector:
          groups:
            globalsettings:
              label: 'My special settings'
              tab: 'default'
      properties:
        yourVariableName:
          type: boolean
          defaultValue: false
          ui:
            label: 'Hide content'
            reloadPageIfChanged: FALSE
            inspector:
              position: 10
              group: 'globalsettings'