[Typo3-dev] finding subpages
media.res | alex widschwendter
a.widschwendter at mediares.at
Fri Apr 8 14:24:56 CEST 2005
hi elmar,
> does any function exists to find all subpages (list of uids) of a
> special page?
i didn't find anything so it made a user function for this reason.
require_once(PATH_t3lib."class.t3lib_page.php");
class user_functions {
function getFirstSubpage () {
$pageObj = t3lib_div::makeInstance('t3lib_pageSelect');
$pages = $pageObj->getMenu($GLOBALS['TSFE']->id);
$firstSubpageId = key($pages);
return 'href="index.php?id='.$firstSubpageId.'"';
}
}
hth alex
More information about the TYPO3-dev
mailing list