Actions
Feature #93741
openFeature request: function getTypoScriptForPage
Status:
New
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2021-03-15
Due date:
% Done:
0%
Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
Description
I built a Symfony command that is configurable wit TypoScript but I could bring it to work only with help (Thanks to Jonas Eberle).
I struggled at the point where I needed the generated TypoScript for a specified rootpage.
I ended up with something like this:
$pid = 1234
$templateService = GeneralUtility::makeInstance(TemplateService::class);
$rootlineUtility = GeneralUtility::makeInstance(RootlineUtility::class, $pid);
$rootline = $rootlineUtility->get();
$templateService->runThroughTemplates($rootline);
$templateService->generateConfig();
dump($templateService->setup);
This seemed not very straightforward to me and after this I'm wishing me something like:
$typoscript = GeneralUtility::makeInstance(TypoScriptService::class)->getTypoScriptForPage($uid);
Actions