[TYPO3-core] RFC: Add support for non-prefixed classes in tslib_pibase->pi_classParam()

Franz Holzinger franz at fholzinger.com
Thu Aug 24 22:40:01 CEST 2006


Hello Michael,

>Problem:
>tslib_pibase->pi_classParam() prefixes every class with the extension key. 
>This is a big waste which is not needed because there is always a parent 
>object that defines this:
>
><div class="tx-indexedsearch">
>    ...
></div>
>
>Solution:
>Add a 2nd parameter to the function which can contain classes which should not 
>be prefixed. Of course this is completely optional!
>
>Branches:
>Trunk only
>
>  
>
>+	function pi_classParam($class, $addClasses='')	{
>+		$output = '';
>+		foreach (t3lib_div::trimExplode(',',$class) as $v)	{
>+			$output.= ' '.$this->pi_getClassName($v);
>+		}
>+		foreach (t3lib_div::trimExplode(',',$addClasses) as $v)	{
>+			$output.= ' '.$v;
>+		}
>+		return ' class="'.trim($output).'"';
> 	}
> 
>  
>
I am no CSS expert. But I think a class name should not contain a ' ' blank.
I do not understand why class names should be added into one.

Greets,

Franz





More information about the TYPO3-team-core mailing list