[TASK] Isolate content element previews for page module
[Packages/TYPO3.CMS.git] / typo3 / sysext / css_styled_content / ext_localconf.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 // unserializing the configuration so we can use it here:
5 $_EXTCONF = unserialize($_EXTCONF);
6 if (!$_EXTCONF || $_EXTCONF['setPageTSconfig']) {
7 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
8 # Removes obsolete type values and fields from "Content Element" table "tt_content"
9 TCEFORM.tt_content.image_frames.disabled = 1
10 ');
11 }
12 if (!$_EXTCONF || $_EXTCONF['removePositionTypes']) {
13 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
14 TCEFORM.tt_content.imageorient.types.image.removeItems = 8,9,10,17,18,25,26
15 ');
16 }
17
18 // Mark the delivered TypoScript templates as "content rendering template" (providing the hooks of "static template 43" = content (default))
19 $GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'][] = 'cssstyledcontent/static/';
20 $GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'][] = 'cssstyledcontent/static/v6.2/';
21
22 // Register for hook to show preview of tt_content element of CType="image" in page module
23 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['image'] =
24 \TYPO3\CMS\CssStyledContent\Hooks\PageLayoutView\ImagePreviewRenderer::class;
25
26 // Register for hook to show preview of tt_content element of CType="textpic" in page module
27 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['textpic'] =
28 \TYPO3\CMS\CssStyledContent\Hooks\PageLayoutView\TextpicPreviewRenderer::class;
29
30 // Register for hook to show preview of tt_content element of CType="text" in page module
31 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['text'] =
32 \TYPO3\CMS\CssStyledContent\Hooks\PageLayoutView\TextPreviewRenderer::class;