1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-01 03:40:27 +02:00

v2.9 fix error with hidden folders and remove unpublished pages from folderContent in item

This commit is contained in:
trendschau
2024-09-10 15:01:54 +02:00
parent 1a84a7dd73
commit 472a44baea
2 changed files with 12 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ meta:
modified: '2024-05-17'
created: '2024-04-25'
time: 13-16-58
hide: false
hide: true
noindex: false
contains: pages
template: ''

View File

@@ -106,10 +106,18 @@ class ControllerWebFrontend extends Controller
$liveNavigation = $this->c->get('dispatcher')->dispatch(new OnPagetreeLoaded($liveNavigation), 'onPagetreeLoaded')->getData();
# For FOLDERS use item without drafts and hidden pages
if(!$home && $item->elementType == 'folder' && !$item->hide)
if(!$home && $item->elementType == 'folder')
{
# $item = $navigation->getItemWithUrl($liveNavigation, $item->urlRelWoF);
$item = $navigation->getItemWithKeyPath($liveNavigation, $item->keyPathArray);
# if folder itself is not hidden
if($item->hide && count($item->folderContent) > 0)
{
$item->folderContent = $navigation->generateLiveNavigationFromDraft($item->folderContent);
}
else
{
# $item = $navigation->getItemWithUrl($liveNavigation, $item->urlRelWoF);
$item = $navigation->getItemWithKeyPath($liveNavigation, $item->keyPathArray);
}
}
# ADD BACKWARD-/FORWARD PAGINATION