Skip to content

Instantly share code, notes, and snippets.

@fsuter
Created April 24, 2014 13:30
Show Gist options
  • Save fsuter/11254636 to your computer and use it in GitHub Desktop.
Save fsuter/11254636 to your computer and use it in GitHub Desktop.
TCA declaration of FAL-based image with a single image
'image' => array(
'exclude' => 0,
'label' => 'LLL:EXT:lima/Resources/Private/Language/locallang_db.xml:fe_users.image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'image',
array(
'appearance' => array(
'createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference'
),
// Override sys_file_reference types to show no additional input fields in FAL relation
'foreign_types' => array(
'0' => array(
'showitem' => '--palette--;;filePalette'
),
'1' => array(
'showitem' => '--palette--;;filePalette'
),
'2' => array(
'showitem' => '--palette--;;filePalette'
),
'3' => array(
'showitem' => '--palette--;;filePalette'
),
'4' => array(
'showitem' => '--palette--;;filePalette'
),
'5' => array(
'showitem' => '--palette--;;filePalette'
)
),
'minitems' => 0,
'maxitems' => 1
),
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
)
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment