[TYPO3-dev] Changing backend CSS only for BE users of a certain group.

Steffen Kamper info at sk-typo3.de
Thu Mar 31 10:51:39 CEST 2011


Hi,

Am 31.03.2011 10:25, schrieb Steffen Gebert:
> Hi,
>
>>> In a next step, I want these CSS changes only applied, if the actual BE
>>> user is member of a given BE group.
>>> Unfortunately, $GLOBALS['BE_USER'] seems not to exists, when
>>> ext_tables.php is parsed.
>>>
>>
>> you can probably do that with a hook, e.g.
>> $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['postUserLookUp'][]...
>>
>>
>> Used that to adjust a backend template file for non-admins.
>
> ext_tables.php shouldn't contain any logic. As Andreas suggested, use a
> hook during runtime to add the CSS files.
>
> You could use the addCssFile() method of the PageRenderer or the
> addStyleSheet(Directory)() methods of the template class.
> I would prefer this way instead of adding the skin during runtime (maybe
> personal taste..)
>

i would use the constructPostProcess hook of backend.php.
Look to ext beuserswitch for an example.

vg Steffen




More information about the TYPO3-dev mailing list