1
0
mirror of https://github.com/typemill/typemill.git synced 2025-07-28 18:00:28 +02:00

V2.9 fix error with hidden folders

This commit is contained in:
trendschau
2024-09-10 14:47:04 +02:00
parent d8eaa2ce1a
commit 1a84a7dd73
5 changed files with 19 additions and 6 deletions

8
content/.yaml Normal file
View File

@@ -0,0 +1,8 @@
meta:
author: Sebastian
created: '2024-09-10'
time: 12-43-18
navtitle: null
modified: '2024-08-01'
title: ''
description: ''

View File

@@ -7,6 +7,6 @@ meta:
modified: '2024-04-27'
created: '2024-04-25'
time: 17-24-48
template: landingpage
hide: false
noindex: false
template: landingpage

View File

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

View File

@@ -106,13 +106,13 @@ 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')
if(!$home && $item->elementType == 'folder' && !$item->hide)
{
# $item = $navigation->getItemWithUrl($liveNavigation, $item->urlRelWoF);
$item = $navigation->getItemWithKeyPath($liveNavigation, $item->keyPathArray);
}
# ADD BACKWARD-/FORWARD PAGINATION
# ADD BACKWARD-/FORWARD PAGINATION
$item = $navigation->getPagingForItem($liveNavigation, $item);
$item = $this->c->get('dispatcher')->dispatch(new OnItemLoaded($item), 'onItemLoaded')->getData();

View File

@@ -744,7 +744,12 @@ class Navigation extends Folder
}
public function getPagingForItem($navigation, $item)
{
{
if(!$item)
{
return $item;
}
# if page is home
if(trim($item->pathWithoutType, DIRECTORY_SEPARATOR) == 'index')
{