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

Steffen Müller typo3 at t3node.com
Thu Mar 31 17:18:58 CEST 2011


Hi.

On 31.03.2011 10:51 Steffen Kamper wrote:
> i would use the constructPostProcess hook of backend.php.

I just realized, that this works for the top-menu, but does not have an 
effect on the content in the right frame (e.g. list module).

I saw, that my custom CSS was inserted in the main HTML, but not in the 
right frame. So instead of the suggested backend.php hook, I tried to 
use a hook in pageRenderer:

ext_tables.php:
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-preProcess'][] 
= 'EXT:my_skin/classes/class.tx_myskin_hook.php:tx_myskin_hook->addStyles';

classes/class.tx_myskin_hook.php:
class tx_myskin_hook {
   function addStyles(&$conf, &$pObj)
     $pObj->addCssFile(t3lib_extMgm::extRelPath('ecoscan_skin') . 
'/res/css/ecoscan_skin.css');
   }
}

This adds the CSS file to the head section of both the main HTML and 
also the HTML of the right frame.

But it still does not work, the CSS is not applied to the content. Seems 
like extJS doesn't let me alter the styles this way.

Do you have any suggestions?



-- 
cheers,
Steffen

TYPO3 Blog: http://www.t3node.com/
Twitter: http://twitter.com/t3node





More information about the TYPO3-dev mailing list