]> _ Git - pmi.git/commitdiff
wip #3322 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 9 Jan 2020 16:10:39 +0000 (17:10 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 9 Jan 2020 16:10:39 +0000 (17:10 +0100)
app/Templates/Catalog.php
app/Templates/News.php
app/Templates/Solution.php

index 46779fa9448ad43f58a855e5e95d70dad7bfa2e8..19aea1b84b89efa2d53ec1abfc90077f78b49d11 100644 (file)
@@ -28,10 +28,10 @@ class Catalog extends TemplateAbstract
 
         Debugbar::startMeasure('nav_catalog_models', 'Request catalog models');
         Debugbar::startMeasure('nav_catalog_models_types', 'Request catalog models (types)');
-        $productTypes = ProductType::all();
+        $productTypes = ProductType::whereVariant($menu->getVariant())->all();
         Debugbar::stopMeasure('nav_catalog_models_types');
         Debugbar::startMeasure('nav_catalog_models_products', 'Request catalog models (products)');
-        $products = Product::all();
+        $products = Product::whereVariant($menu->getVariant())->all();
         Debugbar::stopMeasure('nav_catalog_models_products');
         Debugbar::stopMeasure('nav_catalog_models');
 
index 54ded81ae124bedd7d5d4a8c1b759e09b79b5893..fb24fbe93dc0fd62753651c552ecef5ff08dc17d 100644 (file)
@@ -19,7 +19,7 @@ class News extends Base
         Debugbar::startMeasure('nav_news', 'Make news nav items');
         parent::setMenuChildren($menu);
 
-        $news = NewsModel::all();
+        $news = NewsModel::whereVariant()->all();
 
         foreach ($news as $newsItem) {
 
index a6ed62d29a5c678701554b8de4eaccb0c03a9bc5..a4d54c213f8137f55c0f371ec96afaea17aba1be 100644 (file)
@@ -34,7 +34,7 @@ class Solution extends Base
         Debugbar::startMeasure('nav_applications', 'Make applications nav items');
         parent::setMenuChildren($menu);
 
-        $applications = Application::all();
+        $applications = Application::whereVariant($menu->getVariant())->all();
 
         $solution_apps = $menu->getPageData()->get('applications');
         if (null === $solution_apps || !$solution_apps) {