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

Steffen Gebert steffen.gebert at typo3.org
Thu Mar 31 10:25:33 CEST 2011


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..)

Kind regards
Steffen

-- 
Steffen Gebert
TYPO3 v4 Core Team Member

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org




More information about the TYPO3-dev mailing list