Include CSS file in typo3 login page?

I want to import a CSS file on the typo3 registration page.

Below is my code that I added in the ext_tables.php file.

if (TYPO3_MODE === 'BE') { $GLOBALS['TBE_STYLES']['inDocStyles_TBEstyle'] .= '@import "/typo3conf/ext/mytemplate/Resources/Public/Backend/css/login.css";'; } 

But that does not work.

However, when I add an inline style, it works fine.

 $GLOBALS['TBE_STYLES']['inDocStyles_TBEstyle'] .= ' #t3-login-form:after { content: "\00a0"; background-image: url("' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Backend/Images/foo.png"); width: 220px; height: 187px; display: inline-block; overflow: hidden; position: relative; left: 201px; bottom: 533px; } '; 

But I want to import a css file.

Can anyone suggest me?

I am using the following extensions.

typo3 6.2.14

stream 7.2.1

vhs 2.3.3

fluidcontent 4.3.1

fluidpages 3.3.1

+6
source share
3 answers

In your ext_tables.php file add something like this:

 $GLOBALS['TBE_STYLES']['skins'][$_EXTKEY]['stylesheetDirectories'] = array(); $GLOBALS['TBE_STYLES']['skins'][$_EXTKEY]['stylesheetDirectories']['mystyles'] = 'EXT:' . $_EXTKEY . '/Resources/Public/Css/visual/'; 

Then put the stylesheet in the directory you specify. It will be uploaded to all backend pages.

I'm not sure if there is a nicer solution for including styles.

0
source

I use this in one of my extensions (in ext_tables.php), but for TYPO3 7.6. perhaps it also matches version 6.2

 $TBE_STYLES['skins'][$_EXTKEY]['name'] = $_EXTKEY; $TBE_STYLES['skins'][$_EXTKEY]['stylesheetDirectories']['structure'] = 'EXT:' . ($_EXTKEY) . '/Resources/Public/Backend/Css/Skin/'; 

Hello

0
source

try something like this.

  $relativePath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY); $GLOBALS['TBE_STYLES']['logo_login'] = $relativePath . 'Resources/Public/Backend/Images/LogoLogin.png'; $GLOBALS['TBE_STYLES']['logo'] = $relativePath . 'Resources/Public/Backend/Images/ typo3-topbar@2x.png '; $GLOBALS['TBE_STYLES']['inDocStyles_TBEstyle'] .= $relativePath . ' csspath '; 
0
source

All Articles