[BUGFIX] Split off functional category collection tests
[Packages/TYPO3.CMS.git] / typo3 / sysext / cms / tbl_cms.php
index 8d4c29e..18c086a 100755 (executable)
@@ -1,55 +1,45 @@
 <?php
 /***************************************************************
-*  Copyright notice
-*
-*  (c) 1999-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/**
- * Dynamic configuation of the system-related tables, typ. sys_* series
+ *  Copyright notice
+ *
+ *  (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
  *
- * $Id$
  *
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+/**
+ * Dynamic configuration of the system-related tables, typ. sys_* series
+ *
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
-
-
-
-
-
-// ******************************************************************
 // fe_users
-//
 // FrontEnd users - login on the website
-// ******************************************************************
 $TCA['fe_users'] = array(
        'ctrl' => $TCA['fe_users']['ctrl'],
        'interface' => array(
-               'showRecordFieldList' => 'username,password,usergroup,lockToDomain,name,title,company,address,zip,city,country,email,www,telephone,fax,disable,starttime,endtime,lastlogin'
+               'showRecordFieldList' => 'username,password,usergroup,lockToDomain,name,first_name,middle_name,last_name,title,company,address,zip,city,country,email,www,telephone,fax,disable,starttime,endtime,lastlogin'
        ),
        'feInterface' => $TCA['fe_users']['feInterface'],
        'columns' => array(
                'username' => array(
-                       'label' => 'LLL:EXT:cms/locallang_tca.php:fe_users.username',
+                       'label' => 'LLL:EXT:cms/locallang_tca.xml:fe_users.username',
                        'config' => array(
                                'type' => 'input',
                                'size' => '20',
@@ -58,7 +48,7 @@ $TCA['fe_users'] = array(
                        )
                ),
                'password' => array(
-                       'label' => 'LLL:EXT:cms/locallang_tca.php:fe_users.password',
+                       'label' => 'LLL:EXT:cms/locallang_tca.xml:fe_users.password',
                        'config' => array(
                                'type' => 'input',
                                'size' => '10',
@@ -67,10 +57,11 @@ $TCA['fe_users'] = array(
                        )
                ),
                'usergroup' => array(
-                       'label' => 'LLL:EXT:cms/locallang_tca.php:fe_users.usergroup',
+                       'label' => 'LLL:EXT:cms/locallang_tca.xml:fe_users.usergroup',
                        'config' => array(
                                'type' => 'select',
                                'foreign_table' => 'fe_groups',
+                               'foreign_table_where' => 'ORDER BY fe_groups.title',
                                'size' => '6',
                                'minitems' => '1',
                                'maxitems' => '50'
@@ -78,19 +69,18 @@ $TCA['fe_users'] = array(
                ),
                'lockToDomain' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:cms/locallang_tca.php:fe_users.lockToDomain',
+                       'label' => 'LLL:EXT:cms/locallang_tca.xml:fe_users.lockToDomain',
                        'config' => array(
                                'type' => 'input',
                                'size' => '20',
                                'eval' => 'trim',
                                'max' => '50',
-                               'checkbox' => '',
                                'softref' => 'substitute'
                        )
                ),
                'name' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.name',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.name',
                        'config' => array(
                                'type' => 'input',
                                'size' => '40',
@@ -98,9 +88,39 @@ $TCA['fe_users'] = array(
                                'max' => '80'
                        )
                ),
+               'first_name' => array(
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.first_name',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => '25',
+                               'eval' => 'trim',
+                               'max' => '50'
+                       )
+               ),
+               'middle_name' => array(
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.middle_name',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => '25',
+                               'eval' => 'trim',
+                               'max' => '50'
+                       )
+               ),
+               'last_name' => array(
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.last_name',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => '25',
+                               'eval' => 'trim',
+                               'max' => '50'
+                       )
+               ),
                'address' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.address',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.address',
                        'config' => array(
                                'type' => 'text',
                                'cols' => '20',
@@ -109,7 +129,7 @@ $TCA['fe_users'] = array(
                ),
                'telephone' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.phone',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.phone',
                        'config' => array(
                                'type' => 'input',
                                'eval' => 'trim',
@@ -119,7 +139,7 @@ $TCA['fe_users'] = array(
                ),
                'fax' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.fax',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.fax',
                        'config' => array(
                                'type' => 'input',
                                'size' => '20',
@@ -129,7 +149,7 @@ $TCA['fe_users'] = array(
                ),
                'email' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.email',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.email',
                        'config' => array(
                                'type' => 'input',
                                'size' => '20',
@@ -139,7 +159,7 @@ $TCA['fe_users'] = array(
                ),
                'title' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.title_person',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.title_person',
                        'config' => array(
                                'type' => 'input',
                                'size' => '20',
@@ -149,7 +169,7 @@ $TCA['fe_users'] = array(
                ),
                'zip' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.zip',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.zip',
                        'config' => array(
                                'type' => 'input',
                                'eval' => 'trim',
@@ -159,7 +179,7 @@ $TCA['fe_users'] = array(
                ),
                'city' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.city',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.city',
                        'config' => array(
                                'type' => 'input',
                                'size' => '20',
@@ -169,7 +189,7 @@ $TCA['fe_users'] = array(
                ),
                'country' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.country',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.country',
                        'config' => array(
                                'type' => 'input',
                                'size' => '20',
@@ -179,7 +199,7 @@ $TCA['fe_users'] = array(
                ),
                'www' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.www',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.www',
                        'config' => array(
                                'type' => 'input',
                                'eval' => 'trim',
@@ -189,7 +209,7 @@ $TCA['fe_users'] = array(
                ),
                'company' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.company',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.company',
                        'config' => array(
                                'type' => 'input',
                                'eval' => 'trim',
@@ -199,7 +219,7 @@ $TCA['fe_users'] = array(
                ),
                'image' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.image',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.image',
                        'config' => array(
                                'type' => 'group',
                                'internal_type' => 'file',
@@ -214,35 +234,33 @@ $TCA['fe_users'] = array(
                ),
                'disable' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.disable',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.disable',
                        'config' => array(
                                'type' => 'check'
                        )
                ),
                'starttime' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime',
                        'config' => array(
                                'type' => 'input',
-                               'size' => '8',
+                               'size' => '13',
                                'max' => '20',
-                               'eval' => 'date',
-                               'default' => '0',
-                               'checkbox' => '0'
+                               'eval' => 'datetime',
+                               'default' => '0'
                        )
                ),
                'endtime' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.endtime',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime',
                        'config' => array(
                                'type' => 'input',
-                               'size' => '8',
+                               'size' => '13',
                                'max' => '20',
-                               'eval' => 'date',
-                               'checkbox' => '0',
+                               'eval' => 'datetime',
                                'default' => '0',
                                'range' => array(
-                                       'upper' => mktime(0,0,0,12,31,2020),
+                                       'upper' => mktime(0, 0, 0, 12, 31, 2020)
                                )
                        )
                ),
@@ -256,32 +274,32 @@ $TCA['fe_users'] = array(
                                'wizards' => array(
                                        '_PADDING' => 4,
                                        '0' => array(
-#                                              'type' => t3lib_extMgm::isLoaded('tsconfig_help')?'popup':'',
-                                               'title'  => 'TSconfig QuickReference',
+                                               'title' => 'TSconfig QuickReference',
                                                'script' => 'wizard_tsconfig.php?mode=fe_users',
-                                               'icon'   => 'wizard_tsconfig.gif',
-                                               'JSopenParams' => 'height=500,width=780,status=0,menubar=0,scrollbars=1',
+                                               'icon' => 'wizard_tsconfig.gif',
+                                               'JSopenParams' => 'height=500,width=780,status=0,menubar=0,scrollbars=1'
                                        )
                                ),
                                'softref' => 'TSconfig'
                        ),
-                       'defaultExtras' => 'fixed-font : enable-tab',
+                       'defaultExtras' => 'fixed-font : enable-tab'
                ),
                'lastlogin' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.lastlogin',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.lastlogin',
                        'config' => array(
                                'type' => 'input',
                                'readOnly' => '1',
-                               'size' => '8',
-                               'eval' => 'date'
+                               'size' => '12',
+                               'eval' => 'datetime',
+                               'default' => 0
                        )
                )
        ),
        'types' => array(
                '0' => array('showitem' => '
                        disable,username;;;;1-1-1, password, usergroup, lastlogin;;;;1-1-1,
-                       --div--;LLL:EXT:cms/locallang_tca.xml:fe_users.tabs.personelData, name;;1;;1-1-1, address, zip, city, country, telephone, fax, email, www, image;;;;2-2-2,
+                       --div--;LLL:EXT:cms/locallang_tca.xml:fe_users.tabs.personelData, company;;1;;1-1-1, name;;2;;2-2-2, address, zip, city, country, telephone, fax, email, www, image;;;;2-2-2,
                        --div--;LLL:EXT:cms/locallang_tca.xml:fe_users.tabs.options, lockToDomain;;;;1-1-1, TSconfig;;;;2-2-2,
                        --div--;LLL:EXT:cms/locallang_tca.xml:fe_users.tabs.access, starttime, endtime,
                        --div--;LLL:EXT:cms/locallang_tca.xml:fe_users.tabs.extended
@@ -289,19 +307,12 @@ $TCA['fe_users'] = array(
                ')
        ),
        'palettes' => array(
-               '1' => array('showitem' => 'title,company')
+               '1' => array('showitem' => 'title'),
+               '2' => array('showitem' => 'first_name,--linebreak--,middle_name,--linebreak--,last_name')
        )
 );
-
-
-
-
-
-// ******************************************************************
 // fe_groups
-//
 // FrontEnd usergroups - Membership of these determines access to elements
-// ******************************************************************
 $TCA['fe_groups'] = array(
        'ctrl' => $TCA['fe_groups']['ctrl'],
        'interface' => array(
@@ -309,7 +320,7 @@ $TCA['fe_groups'] = array(
        ),
        'columns' => array(
                'hidden' => array(
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.disable',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.disable',
                        'exclude' => 1,
                        'config' => array(
                                'type' => 'check',
@@ -317,7 +328,7 @@ $TCA['fe_groups'] = array(
                        )
                ),
                'title' => array(
-                       'label' => 'LLL:EXT:cms/locallang_tca.php:fe_groups.title',
+                       'label' => 'LLL:EXT:cms/locallang_tca.xml:fe_groups.title',
                        'config' => array(
                                'type' => 'input',
                                'size' => '20',
@@ -327,7 +338,7 @@ $TCA['fe_groups'] = array(
                ),
                'subgroup' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:cms/locallang_tca.php:fe_groups.subgroup',
+                       'label' => 'LLL:EXT:cms/locallang_tca.xml:fe_groups.subgroup',
                        'config' => array(
                                'type' => 'select',
                                'foreign_table' => 'fe_groups',
@@ -340,17 +351,16 @@ $TCA['fe_groups'] = array(
                ),
                'lockToDomain' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:cms/locallang_tca.php:fe_groups.lockToDomain',
+                       'label' => 'LLL:EXT:cms/locallang_tca.xml:fe_groups.lockToDomain',
                        'config' => array(
                                'type' => 'input',
                                'size' => '20',
                                'eval' => 'trim',
-                               'max' => '50',
-                               'checkbox' => ''
+                               'max' => '50'
                        )
                ),
                'description' => array(
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.description',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.description',
                        'config' => array(
                                'type' => 'text',
                                'rows' => 5,
@@ -367,16 +377,15 @@ $TCA['fe_groups'] = array(
                                'wizards' => array(
                                        '_PADDING' => 4,
                                        '0' => array(
-#                                              'type' => t3lib_extMgm::isLoaded('tsconfig_help')?'popup':'',
                                                'title' => 'TSconfig QuickReference',
                                                'script' => 'wizard_tsconfig.php?mode=fe_users',
                                                'icon' => 'wizard_tsconfig.gif',
-                                               'JSopenParams' => 'height=500,width=780,status=0,menubar=0,scrollbars=1',
+                                               'JSopenParams' => 'height=500,width=780,status=0,menubar=0,scrollbars=1'
                                        )
                                ),
                                'softref' => 'TSconfig'
                        ),
-                       'defaultExtras' => 'fixed-font : enable-tab',
+                       'defaultExtras' => 'fixed-font : enable-tab'
                )
        ),
        'types' => array(
@@ -387,13 +396,7 @@ $TCA['fe_groups'] = array(
                ')
        )
 );
-
-
-
-
-// ******************************************************************
 // sys_domain
-// ******************************************************************
 $TCA['sys_domain'] = array(
        'ctrl' => $TCA['sys_domain']['ctrl'],
        'interface' => array(
@@ -401,26 +404,25 @@ $TCA['sys_domain'] = array(
        ),
        'columns' => array(
                'domainName' => array(
-                       'label' => 'LLL:EXT:cms/locallang_tca.php:sys_domain.domainName',
+                       'label' => 'LLL:EXT:cms/locallang_tca.xml:sys_domain.domainName',
                        'config' => array(
                                'type' => 'input',
                                'size' => '35',
                                'max' => '80',
-                               'eval' => 'required,unique,lower,trim',
+                               'eval' => 'required,unique,lower,trim,domainname',
                                'softref' => 'substitute'
-                       ),
+                       )
                ),
                'redirectTo' => array(
-                       'label' => 'LLL:EXT:cms/locallang_tca.php:sys_domain.redirectTo',
+                       'label' => 'LLL:EXT:cms/locallang_tca.xml:sys_domain.redirectTo',
                        'config' => array(
                                'type' => 'input',
                                'size' => '35',
-                               'max' => '120',
-                               'checkbox' => '',
+                               'max' => '255',
                                'default' => '',
                                'eval' => 'trim',
                                'softref' => 'substitute'
-                       ),
+                       )
                ),
                'redirectHttpStatusCode' => array(
                        'exclude' => 1,
@@ -431,14 +433,14 @@ $TCA['sys_domain'] = array(
                                        array('LLL:EXT:cms/locallang_tca.xml:sys_domain.redirectHttpStatusCode.301', '301'),
                                        array('LLL:EXT:cms/locallang_tca.xml:sys_domain.redirectHttpStatusCode.302', '302'),
                                        array('LLL:EXT:cms/locallang_tca.xml:sys_domain.redirectHttpStatusCode.303', '303'),
-                                       array('LLL:EXT:cms/locallang_tca.xml:sys_domain.redirectHttpStatusCode.307', '307'),
+                                       array('LLL:EXT:cms/locallang_tca.xml:sys_domain.redirectHttpStatusCode.307', '307')
                                ),
                                'size' => 1,
-                               'maxitems' => 1,
-                       ),
+                               'maxitems' => 1
+                       )
                ),
                'hidden' => array(
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.disable',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.disable',
                        'exclude' => 1,
                        'config' => array(
                                'type' => 'check',
@@ -446,29 +448,30 @@ $TCA['sys_domain'] = array(
                        )
                ),
                'prepend_params' => array(
-                       'label' => 'LLL:EXT:cms/locallang_tca.php:sys_domain.prepend_params',
+                       'label' => 'LLL:EXT:cms/locallang_tca.xml:sys_domain.prepend_params',
                        'exclude' => 1,
                        'config' => array(
                                'type' => 'check',
                                'default' => '0'
                        )
+               ),
+               'forced' => array(
+                       'label' => 'LLL:EXT:cms/locallang_tca.xml:sys_domain.forced',
+                       'exclude' => 1,
+                       'config' => array(
+                               'type' => 'check',
+                               'default' => '1'
+                       )
                )
        ),
        'types' => array(
-               '1' => array('showitem' => 'hidden;;;;1-1-1,domainName;;1;;3-3-3,prepend_params')
+               '1' => array('showitem' => 'hidden;;;;1-1-1,domainName;;1;;3-3-3,prepend_params,forced;;;;4-4-4')
        ),
        'palettes' => array(
                '1' => array('showitem' => 'redirectTo, redirectHttpStatusCode')
        )
 );
-
-
-
-
-
-// ******************************************************************
 // pages_language_overlay
-// ******************************************************************
 $TCA['pages_language_overlay'] = array(
        'ctrl' => $TCA['pages_language_overlay']['ctrl'],
        'interface' => array(
@@ -481,33 +484,36 @@ $TCA['pages_language_overlay'] = array(
                        'label' => 'LLL:EXT:cms/locallang_tca.xml:pages.hidden',
                        'config' => array(
                                'type' => 'check',
-                               'default' => '0'
+                               'default' => '0',
+                               'items' => array(
+                                       '1' => array(
+                                               '0' => 'LLL:EXT:cms/locallang_tca.xml:pages.hidden_checkbox_1_formlabel'
+                                       )
+                               )
                        )
                ),
                'starttime' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime',
                        'config' => array(
                                'type' => 'input',
-                               'size' => '8',
+                               'size' => '13',
                                'max' => '20',
-                               'eval' => 'date',
-                               'checkbox' => '0',
+                               'eval' => 'datetime',
                                'default' => '0'
                        )
                ),
                'endtime' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.endtime',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime',
                        'config' => array(
                                'type' => 'input',
-                               'size' => '8',
+                               'size' => '13',
                                'max' => '20',
-                               'eval' => 'date',
-                               'checkbox' => '0',
+                               'eval' => 'datetime',
                                'default' => '0',
                                'range' => array(
-                                       'upper' => mktime(0,0,0,12,31,2020),
+                                       'upper' => mktime(0, 0, 0, 12, 31, 2020)
                                )
                        )
                ),
@@ -517,9 +523,9 @@ $TCA['pages_language_overlay'] = array(
                        'l10n_cat' => 'text',
                        'config' => array(
                                'type' => 'input',
-                               'size' => '30',
-                               'max' => '256',
-                               'eval' => 'required'
+                               'size' => '50',
+                               'max' => '255',
+                               'eval' => 'trim,required'
                        )
                ),
                'subtitle' => array(
@@ -528,9 +534,9 @@ $TCA['pages_language_overlay'] = array(
                        'label' => $TCA['pages']['columns']['subtitle']['label'],
                        'config' => array(
                                'type' => 'input',
-                               'size' => '30',
-                               'max' => '256',
-                               'eval' => ''
+                               'size' => '50',
+                               'max' => '255',
+                               'eval' => 'trim'
                        )
                ),
                'nav_title' => array(
@@ -539,9 +545,8 @@ $TCA['pages_language_overlay'] = array(
                        'label' => $TCA['pages']['columns']['nav_title']['label'],
                        'config' => array(
                                'type' => 'input',
-                               'size' => '30',
-                               'max' => '256',
-                               'checkbox' => '',
+                               'size' => '50',
+                               'max' => '255',
                                'eval' => 'trim'
                        )
                ),
@@ -577,7 +582,7 @@ $TCA['pages_language_overlay'] = array(
                        'label' => $TCA['pages']['columns']['author']['label'],
                        'config' => array(
                                'type' => 'input',
-                               'size' => '20',
+                               'size' => '23',
                                'eval' => 'trim',
                                'max' => '80'
                        )
@@ -587,124 +592,258 @@ $TCA['pages_language_overlay'] = array(
                        'label' => $TCA['pages']['columns']['author_email']['label'],
                        'config' => array(
                                'type' => 'input',
-                               'size' => '20',
+                               'size' => '23',
                                'eval' => 'trim',
-                               'max' => '80'
+                               'max' => '80',
+                               'softref' => 'email[subst]'
                        )
                ),
                'media' => array(
                        'exclude' => 1,
                        'label' => $TCA['pages']['columns']['media']['label'],
-                       'config' => array(
-                               'type' => 'group',
-                               'internal_type' => 'file',
-                               'allowed' => $TCA['pages']['columns']['media']['config']['allowed'],
-                               'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],
-                               'uploadfolder' => 'uploads/media',
-                               'show_thumbs' => '1',
-                               'size' => '3',
-                               'maxitems' => '5',
-                               'minitems' => '0'
-                       )
+                       'config' => \TYPO3\CMS\Core\Extension\ExtensionManager::getFileFieldTCAConfig('media')
                ),
                'url' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:cms/locallang_tca.php:pages.url',
+                       'label' => 'LLL:EXT:cms/locallang_tca.xml:pages.url',
                        'config' => array(
                                'type' => 'input',
-                               'size' => '25',
+                               'size' => '23',
                                'max' => '255',
-                               'eval' => 'trim'
+                               'eval' => 'trim',
+                               'softref' => 'url'
                        )
                ),
                'urltype' => array(
                        'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.type',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.type',
                        'config' => array(
                                'type' => 'select',
                                'items' => $TCA['pages']['columns']['urltype']['config']['items'],
                                'default' => '1'
                        )
                ),
-               'shortcut' => array (
+               'shortcut' => array(
                        'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.shortcut_page',
-                       'config' => array (
+                       'config' => array(
                                'type' => 'group',
                                'internal_type' => 'db',
                                'allowed' => 'pages',
-                               'size' => '3',
+                               'size' => '1',
                                'maxitems' => '1',
                                'minitems' => '0',
-                               'show_thumbs' => '1'
+                               'show_thumbs' => '1',
+                               'wizards' => array(
+                                       'suggest' => array(
+                                               'type' => 'suggest'
+                                       )
+                               )
                        )
                ),
-               'shortcut_mode' => array (
+               'shortcut_mode' => array(
                        'exclude' => 1,
                        'label' => 'LLL:EXT:cms/locallang_tca.xml:pages.shortcut_mode',
-                       'config' => array (
+                       'config' => array(
                                'type' => 'select',
                                'items' => $TCA['pages']['columns']['shortcut_mode']['config']['items'],
                                'default' => '0'
                        )
                ),
                'sys_language_uid' => array(
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.language',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language',
                        'config' => array(
                                'type' => 'select',
                                'foreign_table' => 'sys_language',
                                'foreign_table_where' => 'ORDER BY sys_language.title',
                                'items' => array(
-                                       array('LLL:EXT:lang/locallang_general.php:LGL.default_value',0)
+                                       array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0)
                                )
                        )
                ),
-               'tx_impexp_origuid' => array('config'=>array('type'=>'passthrough')),
-               'l18n_diffsource' => array('config'=>array('type'=>'passthrough')),
+               'tx_impexp_origuid' => array('config' => array('type' => 'passthrough')),
+               'l18n_diffsource' => array('config' => array('type' => 'passthrough')),
                't3ver_label' => array(
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.versionLabel',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.versionLabel',
                        'config' => array(
                                'type' => 'input',
                                'size' => '30',
-                               'max' => '30',
+                               'max' => '255'
                        )
-               ),
+               )
        ),
        'types' => array(
-                       // Standard
-               '1'   => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2, subtitle, nav_title,                                                                                              --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.metadata, --palette--;LLL:EXT:lang/locallang_general.xml:LGL.author;5;;3-3-3, abstract, keywords, description, --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.files, media;;;;4-4-4, --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, starttime, endtime'),
-
-                       // External URL - URL and URL type can be different for the translated page
-               '3'   => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2, subtitle,            --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.url, url;;;;3-3-3, urltype,                                                                                                                                                                                 --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.files, media;;;;4-4-4, --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, starttime, endtime'),
-
-                       // Shortcut - shortcut and shortcut mode can be different for the translated page
-               '4'   => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2, subtitle,            --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.shortcut, shortcut;;;;3-3-3, shortcut_mode,                                                                                                                                                                 --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.files, media;;;;4-4-4, --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, starttime, endtime'),
-
-                       // Mount Point - mount point options can _NOT_ be different for the translated page
-               '7'   => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2, subtitle, nav_title,                                                                                                                                                                                                                                                              --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.files, media;;;;4-4-4, --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, starttime, endtime'),
-
-                       // Separator
-               '199' => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2'),
-
-                       // Sysfolder
-               '254' => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;LLL:EXT:lang/locallang_general.xml:LGL.title;;;2-2-2'),
-
-                       // Recycler
-               '255' => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2')
+               // normal
+               (string) \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_DEFAULT => array(
+                       'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.standard;standard,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.title;title,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.visibility;hiddenonly,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.access;access,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.metadata,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.abstract;abstract,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.metatags;metatags,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.editorial;editorial,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.resources,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.media;media,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.extended,
+               '
+               ),
+               // external URL
+               (string) \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_LINK => array(
+                       'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.external;external,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.title;title,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.visibility;hiddenonly,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.access;access,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.metadata,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.abstract;abstract,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.editorial;editorial,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.resources,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.media;media,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.extended,
+               '
+               ),
+               // shortcut
+               (string) \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SHORTCUT => array(
+                       'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.shortcut;shortcut,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.shortcutpage;shortcutpage,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.title;title,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.visibility;hiddenonly,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.access;access,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.metadata,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.abstract;abstract,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.editorial;editorial,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.resources,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.media;media,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.extended,
+                               '
+               ),
+               // mount page
+               (string) \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_MOUNTPOINT => array(
+                       'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.standard;standard,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.title;title,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.visibility;hiddenonly,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.access;access,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.metadata,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.abstract;abstract,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.editorial;editorial,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.resources,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.media;media,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.extended,
+               '
+               ),
+               // spacer
+               (string) \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SPACER => array(
+                       'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.standard;standard,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.title;titleonly,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.visibility;hiddenonly,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.access;access,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.extended,
+                       '
+               ),
+               // sysfolder
+               (string) \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SYSFOLDER => array(
+                       'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.standard;standard,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.title;titleonly,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.visibility;hiddenonly,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.resources,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.media;media,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.extended,
+               '
+               ),
+               // trash
+               (string) \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_RECYCLER => array(
+                       'showitem' => '--palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.standard;standard,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.title;titleonly,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access,
+                                       --palette--;LLL:EXT:cms/locallang_tca.xml:pages.palettes.visibility;hiddenonly,
+                               --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.extended,
+               '
+               )
        ),
        'palettes' => array(
-               '5' => array('showitem' => 'author,author_email', 'canNotCollapse' => true)
+               '5' => array('showitem' => 'author,author_email', 'canNotCollapse' => TRUE),
+               'standard' => array(
+                       'showitem' => 'doktype;LLL:EXT:cms/locallang_tca.xml:pages.doktype_formlabel, sys_language_uid',
+                       'canNotCollapse' => 1
+               ),
+               'shortcut' => array(
+                       'showitem' => 'doktype;LLL:EXT:cms/locallang_tca.xml:pages.doktype_formlabel, sys_language_uid, shortcut_mode;LLL:EXT:cms/locallang_tca.xml:pages.shortcut_mode_formlabel',
+                       'canNotCollapse' => 1
+               ),
+               'shortcutpage' => array(
+                       'showitem' => 'shortcut;LLL:EXT:cms/locallang_tca.xml:pages.shortcut_formlabel',
+                       'canNotCollapse' => 1
+               ),
+               'external' => array(
+                       'showitem' => 'doktype;LLL:EXT:cms/locallang_tca.xml:pages.doktype_formlabel, sys_language_uid, urltype;LLL:EXT:cms/locallang_tca.xml:pages.urltype_formlabel, url;LLL:EXT:cms/locallang_tca.xml:pages.url_formlabel',
+                       'canNotCollapse' => 1
+               ),
+               'title' => array(
+                       'showitem' => 'title;LLL:EXT:cms/locallang_tca.xml:pages.title_formlabel, --linebreak--, nav_title;LLL:EXT:cms/locallang_tca.xml:pages.nav_title_formlabel, --linebreak--, subtitle;LLL:EXT:cms/locallang_tca.xml:pages.subtitle_formlabel',
+                       'canNotCollapse' => 1
+               ),
+               'titleonly' => array(
+                       'showitem' => 'title;LLL:EXT:cms/locallang_tca.xml:pages.title_formlabel',
+                       'canNotCollapse' => 1
+               ),
+               'hiddenonly' => array(
+                       'showitem' => 'hidden;LLL:EXT:cms/locallang_tca.xml:pages.hidden_formlabel',
+                       'canNotCollapse' => 1
+               ),
+               'access' => array(
+                       'showitem' => 'starttime;LLL:EXT:cms/locallang_tca.xml:pages.starttime_formlabel, endtime;LLL:EXT:cms/locallang_tca.xml:pages.endtime_formlabel',
+                       'canNotCollapse' => 1
+               ),
+               'abstract' => array(
+                       'showitem' => 'abstract;LLL:EXT:cms/locallang_tca.xml:pages.abstract_formlabel',
+                       'canNotCollapse' => 1
+               ),
+               'metatags' => array(
+                       'showitem' => 'keywords;LLL:EXT:cms/locallang_tca.xml:pages.keywords_formlabel, --linebreak--, description;LLL:EXT:cms/locallang_tca.xml:pages.description_formlabel',
+                       'canNotCollapse' => 1
+               ),
+               'editorial' => array(
+                       'showitem' => 'author;LLL:EXT:cms/locallang_tca.xml:pages.author_formlabel, author_email;LLL:EXT:cms/locallang_tca.xml:pages.author_email_formlabel',
+                       'canNotCollapse' => 1
+               ),
+               'language' => array(
+                       'showitem' => 'l18n_cfg;LLL:EXT:cms/locallang_tca.xml:pages.l18n_cfg_formlabel',
+                       'canNotCollapse' => 1
+               ),
+               'media' => array(
+                       'showitem' => 'media;LLL:EXT:cms/locallang_tca.xml:pages.media_formlabel',
+                       'canNotCollapse' => 1
+               )
        )
 );
-
-
-
-// ******************************************************************
+// Keep old code (pre-FAL) for installations that haven't upgraded yet.
+// @deprecated since TYPO3 6.0, please remove in TYPO3 7.0
+// existing installation - and files are merged, nothing to do
+if ((!isset($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['Tx_Install_Updates_File_TceformsUpdateWizard']) || !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['Tx_Install_Updates_File_TceformsUpdateWizard'], 'pages_language_overlay:media')) && !\TYPO3\CMS\Core\Utility\GeneralUtility::compat_version('6.0')) {
+       \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('This installation hasn\'t been migrated to FAL for the field $TCA[pages_language_overlay][columns][media] yet. Please do so before TYPO3 v7.');
+       // Existing installation and no upgrade wizard was executed - and files haven't been merged: use the old code
+       $TCA['pages_language_overlay']['columns']['media']['config'] = array(
+               'type' => 'group',
+               'internal_type' => 'file',
+               'allowed' => $TCA['pages']['columns']['media']['config']['allowed'],
+               'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],
+               'uploadfolder' => 'uploads/media',
+               'show_thumbs' => '1',
+               'size' => '3',
+               'maxitems' => '100',
+               'minitems' => '0'
+       );
+}
 // sys_template
-// ******************************************************************
 $TCA['sys_template'] = array(
        'ctrl' => $TCA['sys_template']['ctrl'],
        'interface' => array(
-               'showRecordFieldList' => 'title,clear,root,include_static,basedOn,nextLevel,resources,sitetitle,description,hidden,starttime,endtime'
+               'showRecordFieldList' => 'title,clear,root,basedOn,nextLevel,sitetitle,description,hidden,starttime,endtime'
        ),
        'columns' => array(
                'title' => array(
@@ -717,7 +856,7 @@ $TCA['sys_template'] = array(
                        )
                ),
                'hidden' => array(
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.disable',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.disable',
                        'exclude' => 1,
                        'config' => array(
                                'type' => 'check',
@@ -725,29 +864,27 @@ $TCA['sys_template'] = array(
                        )
                ),
                'starttime' => array(
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime',
                        'exclude' => 1,
                        'config' => array(
                                'type' => 'input',
-                               'size' => '8',
+                               'size' => '13',
                                'max' => '20',
-                               'eval' => 'date',
-                               'checkbox' => '0',
+                               'eval' => 'datetime',
                                'default' => '0'
                        )
                ),
                'endtime' => array(
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.endtime',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime',
                        'exclude' => 1,
                        'config' => array(
                                'type' => 'input',
-                               'size' => '8',
+                               'size' => '13',
                                'max' => '20',
-                               'eval' => 'date',
-                               'checkbox' => '0',
+                               'eval' => 'datetime',
                                'default' => '0',
                                'range' => array(
-                                       'upper' => mktime(0,0,0,12,31,2020),
+                                       'upper' => mktime(0, 0, 0, 12, 31, 2020)
                                )
                        )
                ),
@@ -785,21 +922,7 @@ $TCA['sys_template'] = array(
                                'wrap' => 'OFF',
                                'softref' => 'TStemplate,email[subst],url[subst]'
                        ),
-                       'defaultExtras' => 'fixed-font : enable-tab',
-               ),
-               'resources' => array(
-                       'label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.resources',
-                       'config' => array(
-                               'type' => 'group',
-                               'internal_type' => 'file',
-                               'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'].',html,htm,ttf,pfb,pfm,txt,css,tmpl,inc,ico,js,xml',
-                               'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],
-                               'uploadfolder' => 'uploads/tf',
-                               'show_thumbs' => '1',
-                               'size' => '7',
-                               'maxitems' => '100',
-                               'minitems' => '0'
-                       )
+                       'defaultExtras' => 'fixed-font : enable-tab'
                ),
                'nextLevel' => array(
                        'label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.nextLevel',
@@ -811,19 +934,13 @@ $TCA['sys_template'] = array(
                                'size' => '1',
                                'maxitems' => '1',
                                'minitems' => '0',
-                               'default' => ''
-                       )
-               ),
-               'include_static' => array(
-                       'label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.include_static',
-                       'config' => array(
-                               'type' => 'select',
-                               'foreign_table' => 'static_template',
-                               'foreign_table_where' => 'ORDER BY static_template.title DESC',
-                               'size' => 10,
-                               'maxitems' => 20,
                                'default' => '',
-                       ),
+                               'wizards' => array(
+                                       'suggest' => array(
+                                               'type' => 'suggest'
+                                       )
+                               )
+                       )
                ),
                'include_static_file' => array(
                        'label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.include_static_file',
@@ -831,8 +948,7 @@ $TCA['sys_template'] = array(
                                'type' => 'select',
                                'size' => 10,
                                'maxitems' => 100,
-                               'items' => array(
-                               ),
+                               'items' => array(),
                                'softref' => 'ext_fileref'
                        )
                ),
@@ -851,24 +967,27 @@ $TCA['sys_template'] = array(
                                'wizards' => array(
                                        '_PADDING' => 4,
                                        '_VERTICAL' => 1,
+                                       'suggest' => array(
+                                               'type' => 'suggest'
+                                       ),
                                        'edit' => array(
                                                'type' => 'popup',
                                                'title' => 'Edit template',
                                                'script' => 'wizard_edit.php',
                                                'popup_onlyOpenIfSelected' => 1,
                                                'icon' => 'edit2.gif',
-                                               'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
+                                               'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1'
                                        ),
                                        'add' => array(
                                                'type' => 'script',
                                                'title' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.basedOn_add',
                                                'icon' => 'add.gif',
                                                'params' => array(
-                                                       'table'=>'sys_template',
+                                                       'table' => 'sys_template',
                                                        'pid' => '###CURRENT_PID###',
                                                        'setValue' => 'prepend'
                                                ),
-                                               'script' => 'wizard_add.php',
+                                               'script' => 'wizard_add.php'
                                        )
                                )
                        )
@@ -890,27 +1009,16 @@ $TCA['sys_template'] = array(
                                'wizards' => array(
                                        '_PADDING' => 4,
                                        '0' => array(
-#                                              'type' => t3lib_extMgm::isLoaded('tsconfig_help')?'popup':'',
                                                'title' => 'TSref online',
                                                'script' => 'wizard_tsconfig.php?mode=tsref',
                                                'icon' => 'wizard_tsconfig.gif',
-                                               'JSopenParams' => 'height=500,width=780,status=0,menubar=0,scrollbars=1',
+                                               'JSopenParams' => 'height=500,width=780,status=0,menubar=0,scrollbars=1'
                                        )
                                ),
                                'wrap' => 'OFF',
                                'softref' => 'TStemplate,email[subst],url[subst]'
                        ),
-                       'defaultExtras' => 'fixed-font : enable-tab',
-               ),
-               'editorcfg' => array(
-                       'label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.editorcfg',
-                       'config' => array(
-                               'type' => 'text',
-                               'rows' => 8,
-                               'cols' => 48,
-                               'wrap' => 'OFF'
-                       ),
-                       'defaultExtras' => 'fixed-font : enable-tab',
+                       'defaultExtras' => 'fixed-font : enable-tab'
                ),
                'description' => array(
                        'label' => 'LLL:EXT:cms/locallang_tca.xml:sys_template.description',
@@ -925,49 +1033,41 @@ $TCA['sys_template'] = array(
                        'config' => array(
                                'type' => 'select',
                                'items' => array(
-                                       array('Default (Include before if Root-flag is set)', '0'),
-                                       array('Always include before this template record', '1'),
-                                       array('Never include before this template record', '2'),
+                                       array('LLL:EXT:cms/locallang_tca.xml:sys_template.static_file_mode.0', '0'),
+                                       array('LLL:EXT:cms/locallang_tca.xml:sys_template.static_file_mode.1', '1'),
+                                       array('LLL:EXT:cms/locallang_tca.xml:sys_template.static_file_mode.2', '2'),
+                                       array('LLL:EXT:cms/locallang_tca.xml:sys_template.static_file_mode.3', '3')
                                ),
                                'default' => '0'
                        )
                ),
                'tx_impexp_origuid' => array('config' => array('type' => 'passthrough')),
                't3ver_label' => array(
-                       'label' => 'LLL:EXT:lang/locallang_general.php:LGL.versionLabel',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.versionLabel',
                        'config' => array(
                                'type' => 'input',
                                'size' => '30',
-                               'max'  => '30',
+                               'max' => '255'
                        )
-               ),
+               )
        ),
        'types' => array(
                '1' => array('showitem' => '
                        hidden,title;;1;;2-2-2, sitetitle, constants;;;;3-3-3, config, description;;;;4-4-4,
-                       --div--;LLL:EXT:cms/locallang_tca.xml:sys_template.tabs.options, clear, root, nextLevel, editorcfg;;;;5-5-5,
-                       --div--;LLL:EXT:cms/locallang_tca.xml:sys_template.tabs.include, include_static,includeStaticAfterBasedOn,6-6-6, include_static_file, basedOn, static_file_mode,
-                       --div--;LLL:EXT:cms/locallang_tca.xml:sys_template.tabs.files, resources,
-                       --div--;LLL:EXT:cms/locallang_tca.xml:sys_template.tabs.access, starttime, endtime'
-               )
+                       --div--;LLL:EXT:cms/locallang_tca.xml:sys_template.tabs.options, clear, root, nextLevel,
+                       --div--;LLL:EXT:cms/locallang_tca.xml:sys_template.tabs.include, includeStaticAfterBasedOn,6-6-6, include_static_file, basedOn, static_file_mode,
+                       --div--;LLL:EXT:cms/locallang_tca.xml:sys_template.tabs.access, starttime, endtime')
        )
 );
-
-
-
-
-
-// ******************************************************************
-// static_template
-// ******************************************************************
-$TCA['static_template'] = array(
-       'ctrl' => $TCA['static_template']['ctrl'],
+// backend_layout
+$TCA['backend_layout'] = array(
+       'ctrl' => $TCA['backend_layout']['ctrl'],
        'interface' => array(
-               'showRecordFieldList' => 'title,include_static,description'
+               'showRecordFieldList' => 'title,config,description,hidden,icon'
        ),
        'columns' => array(
                'title' => array(
-                       'label' => 'Template title:',
+                       'label' => 'LLL:EXT:cms/locallang_tca.xml:backend_layout.title',
                        'config' => array(
                                'type' => 'input',
                                'size' => '25',
@@ -975,61 +1075,56 @@ $TCA['static_template'] = array(
                                'eval' => 'required'
                        )
                ),
-               'constants' => array(
-                       'label' => 'Constants:',
+               'description' => array(
+                       'label' => 'LLL:EXT:cms/locallang_tca.xml:backend_layout.description',
                        'config' => array(
                                'type' => 'text',
-                               'cols' => '48',
-                               'rows' => '10',
-                               'wrap' => 'OFF'
-                       ),
-                       'defaultExtras' => 'fixed-font : enable-tab',
-               ),
-               'include_static' => array(
-                       'label' => 'Include static:',
-                       'config' => array(
-                               'type' => 'select',
-                               'foreign_table' => 'static_template',
-                               'foreign_table_where' => 'ORDER BY static_template.title',
-                               'size' => 10,
-                               'maxitems' => 20,
-                               'default' => ''
+                               'rows' => '5',
+                               'cols' => '25'
                        )
                ),
                'config' => array(
-                       'label' => 'Setup:',
+                       'label' => 'LLL:EXT:cms/locallang_tca.xml:backend_layout.config',
                        'config' => array(
                                'type' => 'text',
-                               'rows' => 10,
-                               'cols' => 48,
-                               'wrap' => 'OFF'
-                       ),
-                       'defaultExtras' => 'fixed-font : enable-tab',
+                               'rows' => '5',
+                               'cols' => '25',
+                               'wizards' => array(
+                                       '_PADDING' => 4,
+                                       0 => array(
+                                               'title' => 'LLL:EXT:cms/locallang_tca.xml:backend_layout.wizard',
+                                               'type' => 'popup',
+                                               'icon' => \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('cms') . 'layout/wizard_backend_layout.png',
+                                               'script' => \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('cms') . 'layout/wizard_backend_layout.php',
+                                               'JSopenParams' => 'height=800,width=800,status=0,menubar=0,scrollbars=0'
+                                       )
+                               )
+                       )
                ),
-               'editorcfg' => array(
-                       'label' => 'Backend Editor Configuration:',
+               'hidden' => array(
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.disable',
+                       'exclude' => 1,
                        'config' => array(
-                               'type' => 'text',
-                               'rows' => 4,
-                               'cols' => 48,
-                               'wrap' => 'OFF'
-                       ),
-                       'defaultExtras' => 'fixed-font : enable-tab',
+                               'type' => 'check',
+                               'default' => '0'
+                       )
                ),
-               'description' => array(
-                       'label' => 'Description:',
+               'icon' => array(
+                       'label' => 'LLL:EXT:cms/locallang_tca.xml:backend_layout.icon',
+                       'exclude' => 1,
                        'config' => array(
-                               'type' => 'text',
-                               'rows' => 10,
-                               'cols' => 48
+                               'type' => 'group',
+                               'internal_type' => 'file',
+                               'allowed' => 'jpg,gif,png',
+                               'uploadfolder' => 'uploads/media',
+                               'show_thumbs' => 1,
+                               'size' => 1,
+                               'maxitems' => 1
                        )
                )
        ),
        'types' => array(
-               '1' => array('showitem' => 'title;;;;2-2-2, constants;;;;3-3-3, config, include_static;;;;5-5-5, description;;;;5-5-5, editorcfg')
+               '1' => array('showitem' => 'hidden,title;;1;;2-2-2, icon, description, config')
        )
 );
-
-
-
 ?>
\ No newline at end of file