TYPO3 is known for its ability to flexibly implement almost any requirement. A key component here is the customization of HTML templates from freely available extensions. This is where you can really let your imagination run wild, but sometimes you quickly reach your limits when simple data is missing.
Many administrators find it helpful to be able to access values from the fields of the tt_content record in the overridden HTML templates of your extensions. Others may need settings from the site configuration. You can easily enable this centrally for all actions in a controller like this:
public function initializeView(): void
{
$this->view->assignMultiple([
'data' => $this->request->getAttribute('currentContentObject')->data,
'site' => $this->request->getAttribute('site'),
'language' => $this->request->getAttribute('language'),
]);
} This means that {data} returns tt_content.* values, {site} returns the settings from the SiteConfiguration, and {language} returns the current language from the SiteConfiguration in the Fluid templates.
Thanks from me and all the other integrators :)




