[TASK] Remove hardcoded TypoScript setup 79/20279/3
authorWouter Wolters <typo3@wouterwolters.nl>
Sun, 28 Apr 2013 21:22:45 +0000 (23:22 +0200)
committerBenjamin Mack <benni@typo3.org>
Fri, 25 Jul 2014 19:58:12 +0000 (21:58 +0200)
TypoScript TemplateService contains some hard coded TS that is always
present. The two defaults config.extTarget and config.uniqueLinkVars
are now moved to EXT:frontend and registered with the usual API call.
styles.insertContent is removed since it was always hidden in the
object browser and probably never used by anyone.

Change-Id: I8d0fd7c91e0c3b7ac19bcf1e435bb911b597e525
Resolves: #42543
Related: #60567
Releases: 6.3
Reviewed-on: http://review.typo3.org/20279
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
typo3/sysext/core/Classes/TypoScript/TemplateService.php
typo3/sysext/frontend/ext_localconf.php

index 0cf9781..ae88d1a 100644 (file)
@@ -120,27 +120,10 @@ class TemplateService {
         */
        public $loaded = 0;
 
-       // Default TypoScript Setup code
        /**
-        * @todo Define visibility
+        * @var array Contains TypoScript setup part after parsing
         */
-       public $setup = array(
-               'styles.' => array(
-                       'insertContent' => 'CONTENT',
-                       'insertContent.' => array(
-                               'table' => 'tt_content',
-                               'select.' => array(
-                                       'orderBy' => 'sorting',
-                                       'where' => 'colPos=0',
-                                       'languageField' => 'sys_language_uid'
-                               )
-                       )
-               ),
-               'config.' => array(
-                       'extTarget' => '_top',
-                       'uniqueLinkVars' => 1
-               )
-       );
+       public $setup = array();
 
        /**
         * @todo Define visibility
index 0abd77b..5b0a27f 100644 (file)
@@ -9,3 +9,10 @@ if (TYPO3_MODE === 'FE' && !isset($_REQUEST['eID'])) {
                'languageAndWorkspaceOverlay'
        );
 }
+
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript(
+       'frontend',
+       'setup',
+       'config.extTarget = _top'
+       . LF . 'config.uniqueLinkVars = 1'
+);