]> _ Git - fluidbook-v3.git/commitdiff
wip #3726 @0.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 23 Jun 2020 11:51:00 +0000 (11:51 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 23 Jun 2020 11:51:00 +0000 (11:51 +0000)
framework/application/Bootstrap.php

index 1585c5edb91d4af2c024d341549265149bf6b5af..6e093aecb4f3d8eaad738aabc8e7dc72a09b0579 100644 (file)
@@ -33,18 +33,19 @@ class Bootstrap extends CubeIT_Bootstrap
 
     protected function _makeNavigationOnePage(&$navigation, $r, $t, $isAdmin, $locale = false)
     {
+        // Remove all reference of the blog on the english version
+        if ($r->template === 'blog' && $locale === 'en') {
+            if (!$isAdmin) {
+                return;
+            } else {
+                $r->online = false;
+            }
+        }
         $page = parent::_makeNavigationOnePage($navigation, $r, $t, $isAdmin, $locale);
 
         if (!$page) return;
 
         if ($page->getTemplate() === 'blog') {
-
-            // Don't show the Blog link in the main menu for the English locale
-            if ($locale == 'en') {
-                $page->setVisible(false);
-                return;
-            }
-
             $this->addBlogPages($page, $locale, $isAdmin);
         }
     }