Feature #20799 ยป 11606.patch
typo3/sysext/cms/tslib/class.tslib_content.php (working copy) | ||
---|---|---|
case 'MULTIMEDIA':
|
||
$content.=$this->MULTIMEDIA($conf);
|
||
break;
|
||
case 'RANDOM':
|
||
$content.=$this->RANDOM($conf);
|
||
break;
|
||
default:
|
||
// call hook functions for extra processing
|
||
if($name && is_array($TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'])) {
|
||
... | ... | |
return $content;
|
||
}
|
||
|
||
/**
|
||
* Rendering the cObject, RANDOM
|
||
*
|
||
* @param array Array of TypoScript properties
|
||
* @return string Output
|
||
*/
|
||
function RANDOM($conf) {
|
||
$content = '';
|
||
if (is_array($conf)) {
|
||
$sortedKeyArray = t3lib_TStemplate::sortedKeyList($conf);
|
||
$key = $sortedKeyArray[array_rand($sortedKeyArray)];
|
||
$content = $this->cObjGetSingle($conf[$key], $conf[$key.'.'], 'random_'.$key); // Get the contentObject
|
||
}
|
||
return $content;
|
||
}
|
||