[TYPO3-mvc] Instantiate extbase action controller inside tslib_fe hook
Thomas "Thasmo" Deinhamer
thasmo at gmail.com
Wed Nov 4 21:10:44 CET 2009
I just realized, that $renderer->headerData is a protected
variable, so it's not accessible inside the hook.
May there be a chance to extend the PageRenderer with public
methods called 'getHeaderData()' which returns the headerData
and 'setHeaderData($data)' which sets it again?
Or even make $headerData public?
Thanks for you oppinions/solutions!
Steffen Kamper schrieb:
> 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