Reputation: 1054
Maybe I'm completely blind and a fool, but how can I access TSFE in BE Module od typo3 9.5?
I'd like to use some Page-Properties of the actual selected site in Backend modules, but I have no idea how to get this since the last time I used it was under pi_based.
\TYPO3\CMS\Core\Utility\DebugUtility::debug(
$GLOBALS['TSFE']->tmpl->setup['config.']['baseURL']
);
This won't work and i am stucking :( Kind regards and thx in advance
Tom
Upvotes: 0
Views: 538
Reputation: 1154
TSFE is the "global object for Frontend", so you should not rely on TSFE in Backend. In TYPO3 v9, you should access the current site object or the Site/Language object for a given page by using the "SiteMatcher" instance. From there, you get the absolute BaseURL.
In fact, I highly recommend not using config.baseURL anymore and use native Site Handling in TYPO3 v9.5, as it is the same API in Frontend and Backend (that's what it was meant to be).
Hope this helps!
Upvotes: 5