public function addCSS ($strCSS, $strType='scss', $bolStatic=true)
	{
		if ($strCSS == '')
		{
			return;
		}
		
		$strType = strtoupper($strType);
		
		if (!in_array($strType, array('CSS', 'SCSS' , 'LESS')))
		{
			return;
		}
		
		if (!$bolStatic && $strType == 'css')
		{
			$strKey = substr(md5($strType . $strCSS), 0, 12);
			$strPath = 'assets/css/' . $strKey . '.' . $strType;
			
			// Write to a temporary file in the assets folder
			if (!file_exists($strPath))
			{
				$objFile = new File($strPath, true);
				$objFile->write($strCSS);
				$objFile->close();
			}
			
			// Add the file path to TL_USER_CSS
			$GLOBALS[TL_USER_CSS][] = $strPath;
		
			return;
		}
		// Add to the combined CSS string
		$GLOBALS['TL_CTB_' . $strType] .= $strCSS;
	}
public function addCSS ($strCSS, $strType='scss', $bolStatic=true)
	{
		if ($strCSS == '')
		{
			return;
		}
		
		$strType = strtoupper($strType);
		
		if (!in_array($strType, array('CSS', 'SCSS' , 'LESS')))
		{
			return;
		}
		
		if (!$bolStatic && $strType == 'css')
		{
			$strKey = substr(md5($strType . $strCSS), 0, 12);
			$strPath = 'assets/css/' . $strKey . '.' . $strType;
			
			// Write to a temporary file in the assets folder
			if (!file_exists($strPath))
			{
				$objFile = new File($strPath, true);
				$objFile->write($strCSS);
				$objFile->close();
			}
			
			// Add the file path to TL_USER_CSS
			$GLOBALS[TL_USER_CSS][] = $strPath;
		
			return;
		}
		// Add to the combined CSS string
		$GLOBALS['TL_CTB_' . $strType] .= $strCSS;
	}
public function addCSS ( $ strCSS , $ strType = 'scss' , $ bolStatic = true ) { if ( $ strCSS == '' ) { return ; } $ strType = strtoupper ( $ strType ) ; if ( ! in_array ( $ strType , array ( 'CSS' , 'SCSS' , 'LESS' ) ) ) { return ; } if ( ! $ bolStatic && $ strType == 'css' ) { $ strKey = substr ( md5 ( $ strType . $ strCSS ) , 0 , 12 ) ; $ strPath = 'assets/css/' . $ strKey . '.' . $ strType ; // Write to a temporary file in the assets folder if ( ! file_exists ( $ strPath ) ) { $ objFile = new File ( $ strPath , true ) ; $ objFile -> write ( $ strCSS ) ; $ objFile -> close ( ) ; } // Add the file path to TL_USER_CSS $ GLOBALS [ TL_USER_CSS ] [ ] = $ strPath ; return ; } // Add to the combined CSS string $ GLOBALS [ 'TL_CTB_' . $ strType ] .= $ strCSS ; }
Add CSS to the page

@param string  $strCSS    The css, scss or less content
@param string  $strType   The type of the content
@param boolean $bolStatic Set false to add the content in an extra file (only when type is css)
Add CSS to the page