Project

General

Profile

Actions

Feature #92778

closed

Provide Event to modify Site configuration

Added by Sebastian Michaelsen about 4 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-11-05
Due date:
% Done:

0%

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

Description

TYPO3 should provide a way to programmtically enhance the Site configuration right after it was read from the YAML file(s) and before it is cached (i.e. here: https://github.com/TYPO3/TYPO3.CMS/blob/abfef0336cb0d25335ace900df385e98d2951820/typo3/sysext/core/Classes/Configuration/SiteConfiguration.php#L172).

My first approach was using a middleware that modified the site config after it was initialized, but that can only modify the configuration of the current page. The configuration will be initialized again for the $siteOfTargetPage when you link to a page for example.

Use Case:
My EXT:dynamic_routing_pages programatically provides the page ids for routes, that otherwise are hardcoded. Currently I have to use an Xclass to achieve it.

Also other extensions could provide site configuration programatically, e.g. determining the root page, languages or project specific options.

Actions #1

Updated by Andreas Kießling about 4 years ago

+1 - i want that too :)

Actions #2

Updated by Sebastian Michaelsen about 4 years ago

  • Description updated (diff)
Actions #3

Updated by Georg Ringer about 4 years ago

  • Status changed from New to Accepted
Actions #4

Updated by Benni Mack about 2 years ago

  • Status changed from Accepted to Needs Feedback

We now have SiteConfigurationLoadedEvent and SiteConfigurationBeforeWriteEvent - is that OK for your use-cases?

Actions #5

Updated by Christian Kuhn 11 months ago

  • Status changed from Needs Feedback to Closed

Hey. I hope it's ok to close here - the event hopefully handles the needs.

Actions

Also available in: Atom PDF