Code:
/**
* Table tl_lexicon
*/
$GLOBALS['TL_DCA']['tl_lexicon'] = array
(
// Config
'config' => array
(
'dataContainer' => 'Table',
'ctable' => array('tl_content'),
'enableVersioning' => true,
'sql' => array
(
'keys' => array
(
'id' => 'primary'
)
),
),
// List
'list' => array
(
'sorting' => array
(
'mode' => 2,
'fields' => array('title'),
'flag' => 1,
'panelLayout' => 'filter;sort,search,limit'
),
'label' => array
(
'fields' => array('title'),
'format' => '%s',
),
'global_operations' => array
(
'all' => array
(
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
'href' => 'act=select',
'class' => 'header_edit_all',
'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"'
)
),
'operations' => array
(
'edit' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_lexicon']['edit'],
'href' => 'table=tl_content',
'icon' => 'edit.gif'
),
'delete' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_lexicon']['delete'],
'href' => 'act=delete',
'icon' => 'delete.gif',
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"'
),
'show' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_lexicon']['show'],
'href' => 'act=show',
'icon' => 'show.gif',
'attributes' => 'style="margin-right:3px"'
),
)
),
// Palettes
'palettes' => array
(
'default' => '{title_legend},title;{description_legend},description'
),
// Fields
'fields' => array
(
'id' => array
(
'sql' => "int(10) unsigned NOT NULL auto_increment"
),
'tstamp' => array
(
'sql' => "int(10) unsigned NOT NULL default '0'"
),
'title' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_lexicon']['title'],
'inputType' => 'text',
'exclude' => true,
'sorting' => true,
'flag' => 1,
'search' => true,
'eval' => array(
'mandatory' => true,
'unique' => true,
'maxlength' => 255,
'tl_class' => 'w50',
),
'sql' => "varchar(255) NOT NULL default ''"
),
'description' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_lexicon']['description'],
'inputType' => 'text',
'exclude' => true,
'sql' => "text NULL"
)
)
);
Lesezeichen