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:
8
content/.yaml
Normal file
8
content/.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
meta:
|
||||
author: Sebastian
|
||||
created: '2024-09-10'
|
||||
time: 12-43-18
|
||||
navtitle: null
|
||||
modified: '2024-08-01'
|
||||
title: ''
|
||||
description: ''
|
@@ -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
|
||||
|
@@ -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: ''
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -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')
|
||||
{
|
||||
|
Reference in New Issue
Block a user