Introduction

The $GLOBALS['PAGE_TYPES'] array

Global array $GLOBALS['PAGES_TYPES'] defines the various types of pages (field: doktype) the system can handle and what restrictions may apply to them. Here you can define which tables are allowed on a certain page type.

This is the default array as set in EXT:core/ext_tables.php:

typo3/sysext/core/ext_tables.php
$GLOBALS['PAGES_TYPES'] = [
   (string)\TYPO3\CMS\Core\Domain\Repository\PageRepository::DOKTYPE_BE_USER_SECTION => [
      'allowedTables' => '*'
   ],
   (string)\TYPO3\CMS\Core\Domain\Repository\PageRepository::DOKTYPE_SYSFOLDER => [
      //  Doktype 254 is a 'Folder' - a general purpose storage folder for whatever you like.
      // In CMS context it's NOT a viewable page. Can contain any element.
      'allowedTables' => '*'
   ],
   (string)\TYPO3\CMS\Core\Domain\Repository\PageRepository::DOKTYPE_RECYCLER => [
      // Doktype 255 is a recycle-bin.
      'allowedTables' => '*'
   ],
   'default' => [
      'allowedTables' => 'pages,sys_category,sys_file_reference,sys_file_collection',
      'onlyAllowedTables' => false
   ],
];
Copied!

The key used in the array above is the value that will be stored in the doktype field of the "pages" table.

Each array has the following options available:

Key

Description

type

Can be "sys" or "web". This is purely informative, as TYPO3 does nothing with that piece of data.

allowedTables

The tables that may reside on pages with that "doktype". Comma-separated list of tables allowed on this page doktype. "*" = all.

onlyAllowedTables

Boolean. If set to true, changing the page type will be blocked if the chosen page type contains records that it would not allow.