Просмотр исходного кода

Fixed setCurrentUri() in buildSideMenu()

With this fix, the active side menu item is shown correctly even if

* the script name is in the URI (e.g., app_dev.php),
* the script directory is below the web root (e.g., /backend/) and
* the URI contains parameters (e.g., ?param1=value&param2=value).
Thomas Konrad 12 лет назад
Родитель
Сommit
d2b3646f1b
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Admin/Admin.php

+ 1 - 1
Admin/Admin.php

@@ -1335,7 +1335,7 @@ abstract class Admin implements AdminInterface, DomainObjectInterface
 
         $menu = $this->menuFactory->createItem('root');
         $menu->setChildrenAttribute('class', 'nav nav-list');
-        $menu->setCurrentUri($this->getRequest()->getPathInfo());
+        $menu->setCurrentUri($this->getRequest()->getBaseUrl().$this->getRequest()->getPathInfo());
 
         $this->configureSideMenu($menu, $action, $childAdmin);