Skip to content

Instantly share code, notes, and snippets.

@Lefaux
Last active August 29, 2015 14:21
Show Gist options
  • Save Lefaux/890c5dfb2dd701acc9a8 to your computer and use it in GitHub Desktop.
Save Lefaux/890c5dfb2dd701acc9a8 to your computer and use it in GitHub Desktop.
Proposal for a new Syntax for the showItem list in TYPO3s TCA
<?php
$TCA['tt_content']['types']['html'] = array(
//YUG! :(
'showitem' => '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general, header;LLL:EXT:cms/locallang_ttc.xlf:header.ALT.html_formlabel, bodytext;LLL:EXT:cms/locallang_ttc.xlf:bodytext.ALT.html_formlabel;;nowrap:wizards[t3editor], --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.appearance, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.frames;frames, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.visibility;visibility, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.access;access, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended',
//NEAT! :)
'showItems' => array(
'generalTab ' => array(
'tabLabel' => 'General',
'tabItems' => array(
'generalPalette' => array(
'type' => 'palette',
'label' => 'LLL:EXT:cms/locallang_ttc.xlf:palette.general',
'paletteIdentifier' => 'general'
),
'headerField' => array(
'type' => 'field',
'fieldIdentifier' => 'header',
//arguably?
'subPalettes' => array(
'generalPalette' => array(
'type' => 'palette',
'label' => 'LLL:EXT:cms/locallang_ttc.xlf:palette.general',
'paletteIdentifier' => 'general'
),
)
),
'bodytextField' => array(
'type' => 'field',
'fieldIdentifier' => 'bodytext'
)
)
),
'appearanceTab' => array(
'tabLabel' => 'LLL:EXT:cms/locallang_ttc.xlf:tabs.appearance',
'tabItems' => array(
'framePalette' => array(
'type' => 'palette',
'label' => 'LLL:EXT:cms/locallang_ttc.xlf:palette.frames',
'paletteIdentifier' => 'frames'
)
)
),
'accessTab' => array(
'tabLabel' => 'LLL:EXT:cms/locallang_ttc.xlf:tabs.access',
'tabItems' => array(
'visibilityPalette' => array(
'type' => 'palette',
'label' => 'LLL:EXT:cms/locallang_ttc.xlf:palette.visibility',
'paletteIdentifier' => 'visibility'
),
'accessPalette' => array(
'type' => 'palette',
'label' => 'LLL:EXT:cms/locallang_ttc.xlf:palette.access',
'paletteIdentifier' => 'access'
),
)
),
'extendedTab' => array(
'tabLabel' => 'LLL:EXT:cms/locallang_ttc.xlf:tabs.extended',
'tabItems' => array()
)
),
'columnsOverrides' => array(
'header' => array(
'label' => 'LLL:EXT:cms/locallang_ttc.xlf:header.ALT.html_formlabel'
),
'bodytext' => array(
'type' => 't3editor',
'label' => 'LLL:EXT:cms/locallang_ttc.xlf:bodytext.ALT.html_formlabel'
),
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment