PHP Code:
if(TL_MODE == 'FE') // front end, or BE for back end
{
// use this path: system/modules/myModule/assets/, or: files/myFolder/
// into the HEAD
$GLOBALS['TL_CSS'][] = 'files/css/my.css';
$GLOBALS['TL_USER_CSS'][] = 'files/css/my.css'; // don't know the difference
$GLOBALS['TL_JAVASCRIPT'][] = 'files/js/my.js';
// files/css/_my_be.css|static - puts it in the combined file, also possible with *.js|static
// with |static gets not combined if you're in Debug-Mode
// further down below the HEAD
$GLOBALS['TL_HEAD'][] = '<link rel="stylesheet" href="files/css/my.css">';
$GLOBALS['TL_HEAD'][] = '<script src="files/js/my.js"></script>';
// end of the BODY
$GLOBALS['TL_BODY'][] = '<link rel="stylesheet" href="files/css/my.css">';
$GLOBALS['TL_BODY'][] = '<script src="files/js/my.js"></script>';
}
Bookmarks