Project

General

Profile

Actions

Feature #28880

closed

Enable INCLUDE_TYPOSCRIPT for be_layouts

Added by Sebastian Fischer over 12 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2011-08-10
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
easy
Sprint Focus:

Description

Since the be_layout uses typoscript for storeing the configuration only inside the layout field its not possible to handle the layout in an version controll system.
With only one line changed it would be possible to achive in the layout field something like this:

<INCLUDE_TYPOSCRIPT:source="FILE:fileadmin/layout.ts">

All that needs to be done is change typo3/sysext/cms/classes/class.tx_cms_backendlayout.php with the following:

$parser>parse($backendLayout['config']);
+$parser->parse($parser->checkIncludeLines($backendLayout['config']));

Now it would be possible to load external layout script files. There is no need to store changes back there because changes in typoscript templates are stored in the setup or constants field too.

Actions #1

Updated by Susanne Moog over 12 years ago

  • Status changed from New to Accepted
Actions #2

Updated by Steffen Ritter about 12 years ago

  • Tracker changed from Bug to Feature
  • Target version deleted (4.7.0)
Actions #3

Updated by Stefan Neufeind over 11 years ago

Change for 6.0+ to make it work ("basic version"): Make above change but to PageLayoutView.php
$parser>parse($backendLayoutRecord['config']);
+$parser->parse($parser->checkIncludeLines($backendLayoutRecord['config']));

(Tested and works for me.)

And since that helps for certain special use-cases already, we should imho for now maybe add it but not yet "advertise" it. Since the full resolution misses the following additional points (when editing a backend-layout record:)

  • Have a checkbox to "Include TypoScript file content" (as for example in Template > Setup)
  • If set then include that content and save it to external files again when saving (for brief examples how to do that see TypoScriptTemplateInformationModuleFunctionController.php, processTemplateRowAfterLoading() and processTemplateRowBeforeSaving())
  • Make the layout-wizard work somehow. (I guess that thing will strip the include-markers upon save.)
Actions #4

Updated by Anja Leichsenring over 11 years ago

Patchset 1 is available at https://review.typo3.org/#/c/17052

Actions #5

Updated by Gerrit Code Review over 11 years ago

  • Status changed from Accepted to Under Review

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17052

Actions #6

Updated by Gerrit Code Review over 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17052

Actions #7

Updated by Anja Leichsenring over 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF