[TYPO3] Beginner extending cms/ext_tables.php ?
Matthew Manderson
matthew at manderson.co.uk
Sat Feb 25 16:20:07 CET 2006
Regards
Any advice on the right way to extend cms/ext_tables.php?
I need to increase the subtitle field size to more than the coded 256
characters.
'subtitle' => Array (
'exclude' => 1,
'label' => 'LLL:EXT:cms/locallang_tca.php:pages.subtitle',
'config' => Array (
'type' => 'input',
'size' => '30',
'max' => '256',
'eval' => ''
)
),
I created a kickstarter extension and then edited the files:
In my ext_tables.sql file:
#
# Alter table structure for table 'pages'
#
ALTER TABLE pages modify subtitle text NOT NULL
This sql does not run?
In my ext_tables.php file:
<?php
if (!defined ('TYPO3_MODE')) die ('Access denied.');
// ****************************
// Extend 'pages'-table
// ****************************
if (TYPO3_MODE=='BE') {
// Setting ICON_TYPES (obsolete by the
// removal of the plugin_mgm extension)
$ICON_TYPES = Array();
}
// Overide columns:
$TCA['pages']['columns'] = array_merge($TCA['pages']['columns'],Array(
'subtitle' => Array (
'exclude' => 1,
'label' => 'LLL:EXT:cms/locallang_tca.php:pages.subtitle',
'config' => Array (
'type' => 'input',
'size' => '30',
'max' => '1000',
'eval' => ''
)
),
));
t3lib_div::loadTCA("pages");
t3lib_extMgm::addTCAcolumns("pages",$tempColumns,1);
t3lib_extMgm::addToAllTCAtypes("pages","subtitle;;;;1-1-1");
?>
This code does not overide the system default?
Any ideas?
Thanks
Matthew
More information about the TYPO3-english
mailing list