registerArgument( 'template', 'string', "The template's name", true ); } /** * -- This method is expected by Fluid -- * Renders the content as html * * @return int|null */ public function render() { $rootId = GetIdViewHelper::renderStatic( $this->arguments, $this->renderChildrenClosure, $this->renderingContext ); $subpages = $this->pageRepository->getAllSubpagesForPage($rootId); $templateName = 'OpenTalent.OtTemplating->' . $this->arguments['template']; foreach ($subpages as $page) { if ($page['tx_fed_page_controller_action'] === $templateName & $page['deleted'] === 0 & $page['hidden'] === 0 ) { return $page['uid']; } } return null; } }