diff --git a/TL_ROOT/system/modules/backboneit_navigation/AbstractModuleNavigation.php b/TL_ROOT/system/modules/backboneit_navigation/AbstractModuleNavigation.php index 45df747..2e31e04 100644 --- a/TL_ROOT/system/modules/backboneit_navigation/AbstractModuleNavigation.php +++ b/TL_ROOT/system/modules/backboneit_navigation/AbstractModuleNavigation.php @@ -457,7 +457,7 @@ public function compileNavigationItem(array $arrPage, $blnForwardResolution = tr } if(!$objNext->numRows) { - $arrPage['href'] = $this->generateFrontendUrl($arrPage, null, null, true); + $arrPage['href'] = $this->generatePageUrl($arrPage); } elseif($objNext->type == 'redirect') { $arrPage['href'] = $this->encodeEmailURL($objNext->url); @@ -465,11 +465,11 @@ public function compileNavigationItem(array $arrPage, $blnForwardResolution = tr } else { $arrPage['tid'] = $objNext->id; - $arrPage['href'] = $this->generateFrontendUrl($objNext->row(), null, null, true); + $arrPage['href'] = $this->generatePageUrl($objNext->row()); } } else { $arrPage['tid'] = $arrPage['jumpTo']; - $arrPage['href'] = $this->generateFrontendUrl($arrPage, null, null, true); + $arrPage['href'] = $this->generatePageUrl($arrPage); } break; @@ -491,7 +491,7 @@ public function compileNavigationItem(array $arrPage, $blnForwardResolution = tr case 'error_401': case 'error_403': case 'error_404': - $arrPage['href'] = $this->generateFrontendUrl($arrPage, null, null, true); + $arrPage['href'] = $this->generatePageUrl($arrPage); break; } @@ -693,4 +693,13 @@ protected function executeItemHook(array &$arrPage, $blnForce = false) { } } + private function generatePageUrl(array $arrPage) + { + $pageModel = \Contao\PageModel::findByPk($arrPage['id']); + if ($pageModel) { + $pageModel->getFrontendUrl(); + } + + return null; + } }