From: Vincent Vanwaelscappel Date: Tue, 31 Dec 2019 16:45:32 +0000 (+0100) Subject: wip #3294 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b3d8ed5df4fcd09d7a03919b9e0dcd15b0cedcce;p=pmi.git wip #3294 @0.5 --- diff --git a/app/Templates/Solution.php b/app/Templates/Solution.php index d565b97..a6ed62d 100644 --- a/app/Templates/Solution.php +++ b/app/Templates/Solution.php @@ -10,8 +10,6 @@ use Cubist\Backpack\app\Magic\PageData; class Solution extends Base { - protected static $_menuChildrenDone = false; - public function getName() { return 'Solution'; @@ -33,18 +31,20 @@ class Solution extends Base public function setMenuChildren($menu) { - if (self::$_menuChildrenDone) { - return; - } - - self::$_menuChildrenDone = true; - Debugbar::startMeasure('nav_applications', 'Make applications nav items'); parent::setMenuChildren($menu); $applications = Application::all(); + $solution_apps = $menu->getPageData()->get('applications'); + if (null === $solution_apps || !$solution_apps) { + return; + } + foreach ($applications as $application) { + if (!in_array($application->id, $solution_apps)) { + continue; + } $item = new PageItem(); $item->initFromEntity($application); $item->setTitle($application->title); diff --git a/resources/views/partials/footer-language-switcher.blade.php b/resources/views/partials/footer-language-switcher.blade.php index 0560df3..d437cba 100644 --- a/resources/views/partials/footer-language-switcher.blade.php +++ b/resources/views/partials/footer-language-switcher.blade.php @@ -11,9 +11,6 @@ @foreach($locales['others'] as $code=>$locale) @php $alternate=CubistMenu::getCurrentPage()->getTranslatedPage($code,false); - if(null===$alternate){ - - } @endphp