[FEATURE] Enable INCLUDE_TYPOSCRIPT for be_layouts 52/17052/4
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 10 Dec 2012 08:28:16 +0000 (09:28 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Mon, 17 Dec 2012 14:19:15 +0000 (15:19 +0100)
The backend layout config field contains a TypoScript like syntax
to define the columns and rows. After all TypoScript containing fields
(setup, constants, userTS, pageTs) understand the INCLUDE_TYPOSCRIPT
notation to read the configuration from an external file, this should
be possible for the backend layout config field as well.

The patch only enables the reading out of files, the whole write to
file functionality is not provided.

Resolves: #28880
Releases: 6.1

Change-Id: Ic43d103cf64b904c62e0866a252bb529f9091bb2
Reviewed-on: https://review.typo3.org/17052
Reviewed-by: Sebastian Michaelsen
Tested-by: Sebastian Michaelsen
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/backend/Classes/View/BackendLayoutView.php
typo3/sysext/backend/Classes/View/PageLayoutView.php

index c789602..f1747f0 100644 (file)
@@ -131,7 +131,7 @@ class BackendLayoutView {
                if ($backendLayout) {
                        /** @var $parser \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser */
                        $parser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser');
-                       $parser->parse($backendLayout['config']);
+                       $parser->parse($parser->checkIncludeLines($backendLayout['config']));
                        $backendLayout['__config'] = $parser->setup;
                        $backendLayout['__items'] = array();
                        $backendLayout['__colPosList'] = array();
index d76526e..bd1c845 100644 (file)
@@ -529,7 +529,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                        // GRID VIEW:
                                        // Initialize TS parser to parse config to array
                                        $parser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser');
-                                       $parser->parse($backendLayoutRecord['config']);
+                                       $parser->parse($parser->checkIncludeLines($backendLayoutRecord['config']));
                                        $grid .= '<div class="t3-gridContainer"><table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" class="t3-page-columns t3-gridTable">';
                                        // Add colgroups
                                        $colCount = intval($parser->setup['backend_layout.']['colCount']);