[TYPO3-mvc] Instantiate extbase action controller inside tslib_fe hook

Steffen Kamper info at sk-typo3.de
Sat Oct 31 11:10:43 CET 2009


Hi,

Thomas "Thasmo" Deinhamer schrieb:
> What is the correct way to add external CSS and JS files
> inside a hook and/or a frontend plugin/action controller?
> 
> If files are added using 'additionalHeaderData()', the files
> won't be available inside the frontend renderer arrays.
> 
> What's the solution?
> 
> Thank you!
> 

the arrays are references. Add files in array or unset elements.
As this is a transition many users used headerData for JS/CSS what 
should not be used in future for that. You have a reference of the 
pageRenderer in Hook, so you can access this data with $pObj->headerData.

vg Steffen


More information about the TYPO3-project-typo3v4mvc mailing list