[BUGFIX] Enable alt and link fields for page media 16/29816/2
authorFrans Saris <franssaris@gmail.com>
Sat, 3 May 2014 15:51:30 +0000 (17:51 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 3 May 2014 20:17:06 +0000 (22:17 +0200)
As the page.media in most cases is for images it makes
sense to enable the alt and link fields just like
tt_content.images.

This patch changes the default TCA for table pages so
the alt and link fields are enabled for the media
file_references.

Resolves: #56884
Releases: 6.2
Change-Id: I4496644d340a6fab9be18bf4942ea96a22b1b4ce
Reviewed-on: https://review.typo3.org/29816
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Nadir S.
Tested-by: Nadir S.
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Configuration/TCA/pages.php

index f6af7f0..8098a6b 100644 (file)
@@ -659,7 +659,42 @@ return array(
                'media' => array(
                        'exclude' => 1,
                        'label' => 'LLL:EXT:cms/locallang_tca.xlf:pages.media',
-                       'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('media')
+                       'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('media', array(
+                                       // Use the imageoverlayPalette instead of the basicoverlayPalette
+                                       'foreign_types' => array(
+                                               '0' => array(
+                                                       'showitem' => '
+                                                               --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
+                                                               --palette--;;filePalette'
+                                               ),
+                                               \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array(
+                                                       'showitem' => '
+                                                               --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
+                                                               --palette--;;filePalette'
+                                               ),
+                                               \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
+                                                       'showitem' => '
+                                                               --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
+                                                               --palette--;;filePalette'
+                                               ),
+                                               \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array(
+                                                       'showitem' => '
+                                                               --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
+                                                               --palette--;;filePalette'
+                                               ),
+                                               \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array(
+                                                       'showitem' => '
+                                                               --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
+                                                               --palette--;;filePalette'
+                                               ),
+                                               \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
+                                                       'showitem' => '
+                                                               --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
+                                                               --palette--;;filePalette'
+                                               )
+                                       )
+                               )
+                       )
                ),
                'is_siteroot' => array(
                        'exclude' => 1,