|
@@ -11,7 +11,7 @@ use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
|
|
/**
|
|
/**
|
|
|
* Retrieves and returns the uid of the events' page of the current site
|
|
* Retrieves and returns the uid of the events' page of the current site
|
|
|
* The events page is the first page found with the template 'OpenTalent.OtTemplating->events'
|
|
* The events page is the first page found with the template 'OpenTalent.OtTemplating->events'
|
|
|
- * Returns null if no such page is found
|
|
|
|
|
|
|
+ * Returns null if no such page is found, or if the page is disabled
|
|
|
*
|
|
*
|
|
|
* Call it in fluid templates with:
|
|
* Call it in fluid templates with:
|
|
|
*
|
|
*
|
|
@@ -48,7 +48,10 @@ class GetIdViewHelper extends OtAbstractViewHelper
|
|
|
$subpages = $pageRepository->getAllSubpagesForPage($rootId);
|
|
$subpages = $pageRepository->getAllSubpagesForPage($rootId);
|
|
|
|
|
|
|
|
foreach ($subpages as $page) {
|
|
foreach ($subpages as $page) {
|
|
|
- if ($page['tx_fed_page_controller_action'] === 'OpenTalent.OtTemplating->events') {
|
|
|
|
|
|
|
+ if ($page['tx_fed_page_controller_action'] === 'OpenTalent.OtTemplating->events'
|
|
|
|
|
+ & $page['deleted'] == 0
|
|
|
|
|
+ & $page['hidden'] == 0
|
|
|
|
|
+ ) {
|
|
|
return $page['uid'];
|
|
return $page['uid'];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|