LOAD_REGISTER = переменная ? Пример выборки списка системных страниц.
includeLibs.myFunc = path/to/your/func.php page.1 = LOAD_REGISTER page.1{ storage_pids.cObject = USER storage_pids.cObject{ userFunc = user_func->getCurrentSysFolders } } page.5 = TEXT page.5.data = register:storage_pids page.10 = TEXT page.10.value = <br /><br /> page.15 = TEXT page.15.dataWrap = <b>{register:storage_pids}</b>
class user_func{ /* return all child pages with doktype=254, not hidden and not deleted */ function getCurrentSysFolders(){ global $TSFE; $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*','pages','pid='.$TSFE->id.' AND doktype=254 AND deleted=0 AND hidden=0','','',''); $i = 0; while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){ if($i > 0) $result .= ","; $result .= $row['uid']; $i++; } return $result; } }
Вывод данного сниппета при результате метода getCurrentSysFolders = 7,15,28
Будет
7,15,28 7,15,28
Комментарии