TYPO3  7.6
css_styled_content/ext_localconf.php
Go to the documentation of this file.
1 <?php
2 defined('TYPO3_MODE') or die();
3 
4 // Get the extension configuration
5 $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY]);
6 
7 // Disable image positions that make no sense on CType=image (it leaves just "above left", "center" and "right")
8 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
9  TCEFORM.tt_content.imageorient.types.image.removeItems = 8,9,10,17,18,25,26
10 ');
11 
12 // Mark the delivered TypoScript templates as "content rendering template" (providing the hooks of "static template 43" = content (default))
13 $GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'][] = 'cssstyledcontent/static/';
14 $GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'][] = 'cssstyledcontent/static/v6.2/';
15 
16 // Register for hook to show preview of tt_content element of CType="image" in page module
17 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['image'] =
18  \TYPO3\CMS\CssStyledContent\Hooks\PageLayoutView\ImagePreviewRenderer::class;
19 
20 // Register for hook to show preview of tt_content element of CType="textpic" in page module
21 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['textpic'] =
22  \TYPO3\CMS\CssStyledContent\Hooks\PageLayoutView\TextpicPreviewRenderer::class;
23 
24 // Register for hook to show preview of tt_content element of CType="text" in page module
25 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['text'] =
26  \TYPO3\CMS\CssStyledContent\Hooks\PageLayoutView\TextPreviewRenderer::class;
27 
28 if (!isset($extConf['loadContentElementWizardTsConfig']) || (int)$extConf['loadContentElementWizardTsConfig'] === 1) {
29  // Include new content elements to modWizards
30  \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:css_styled_content/Configuration/PageTSconfig/NewContentElementWizard.ts">');
31 }