mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Fixed the main menu title on small devices
This commit is contained in:
parent
b36340dbd7
commit
93fe3769b2
@ -362,6 +362,20 @@ class NavigationManager
|
||||
return $this->contextOwner == $item->owner && $this->contextMainMenuItemCode == $item->code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the currently active main menu item
|
||||
* @param mixed $item Returns the item object or null.
|
||||
*/
|
||||
public function getActiveMainMenuItem()
|
||||
{
|
||||
foreach ($this->listMainMenuItems() as $item) {
|
||||
if ($this->isMainMenuItemActive($item))
|
||||
return $item;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a side menu item is active.
|
||||
* @param mixed $item Specifies the item object.
|
||||
|
@ -3,7 +3,11 @@
|
||||
<div class="toolbar-item">
|
||||
<div data-control="toolbar">
|
||||
<a class="menu-toggle" href="javascript:;">
|
||||
<i class="icon-bars"></i>CMS
|
||||
<i class="icon-bars"></i>
|
||||
<?php
|
||||
$activeItem = BackendMenu::getActiveMainMenuItem();
|
||||
echo $activeItem ? e(trans($activeItem->label)) : 'CMS';
|
||||
?>
|
||||
</a>
|
||||
|
||||
<ul class="nav">
|
||||
|
Loading…
x
Reference in New Issue
Block a user