я делал такую штуку.
Написал PHP код (на основе KB TV Content Slide) который берет все элементы контента из заданной колонки (поля TV) c заданных страниц.
Ну а потом это вставляется через TS
Код:
includeLibs.user_lib = fileadmin/templates/tv_content_all_pages.php
lib.content_right1 = RECORDS
lib.content_right1 {
source.postUserFunc = user_tv_content->main
source.postUserFunc{
field = field_content_right2
storage_uid=64
exclude_page_uid= 93,95
#exclude_content_uid= 75,77
}
tables = tt_content
}
PHP код:
class user_tv_content {
function main($content,$conf) {
//Array page
$page_id=intval($conf['storage_uid']);
//$page = $GLOBALS['TSFE']->sys_page->getPage($page_id);
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'uid='.$page_id, "", "","1");
if ($page = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
//t3lib_div::devLog( "!!", 'user_tv_content', 2);
//t3lib_div::devLog('storage_uid='.$conf['storage_uid'] , 'user_tv_content', 2);
//t3lib_div::devLog( $page['tx_templavoila_flex'], 'user_tv_content', 2);
$flexXML = $page['tx_templavoila_flex'];
$XML = t3lib_div::xml2array($flexXML);
$content= $XML['data']['sDEF']['lDEF'][$conf['field']]['vDEF'];
t3lib_div::devLog( "exclude_page_uid=".$conf['exclude_page_uid'], 'user_tv_content', 2);
if ($conf['exclude_page_uid']!=""){
$exclude_pages = t3lib_div::trimExplode(',', $conf['exclude_page_uid'], 1);
//t3lib_div::devLog( $exclude_pages[0]." ".$exclude_pages[1], "exclude!!! = ",2);
/*
exclude_page_uid=9,5,4,3,84
exclude_content_uid=75
*/
$search=array_search($GLOBALS["TSFE"]->id, $exclude_pages);
// t3lib_div::devLog( $search, "search!!! = ",2);
//$search = false;
//if ( (array_search($GLOBALS["TSFE"]->id, $exclude_pages) !== false) && ($conf['exclude_content_uid']!="") ) {
if (array_search($GLOBALS["TSFE"]->id, $exclude_pages) !== false) {
$content = "";
/*
//t3lib_div::devLog( "exclude", 'user_tv_content', 2);
$parts = t3lib_div::trimExplode(',', $content, 1);
$block=intval(array_search($conf['exclude_content_uid'], $parts));
//t3lib_div::devLog( "block=".$block, 'user_tv_content', 2);
// unset($parts[$block]);
array_splice($parts, $block, 1);
$content = implode(',', $parts);
//t3lib_div::devLog( "content=".$content, 'user_tv_content', 2);
*/
}
}
}
return $content;
}
}