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:
@@ -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: ''
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user