mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Fix #2345 missing module name in admin page title
This commit is contained in:
parent
db8f6b2d59
commit
928a0ab5d9
1 changed files with 13 additions and 5 deletions
|
|
@ -98,14 +98,13 @@ class Base extends \ModuleObject
|
|||
$result = AdminMenuModel::checkAdminMenu();
|
||||
include $result->php_file;
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
|
||||
// get current menu's subMenuTitle
|
||||
$moduleActionInfo = $oModuleModel->getModuleActionXml($module);
|
||||
$moduleActionInfo = \ModuleModel::getModuleActionXml($module);
|
||||
$moduleMenus = isset($moduleActionInfo->menu) ? (array)$moduleActionInfo->menu : [];
|
||||
$currentAct = Context::get('act');
|
||||
$subMenuTitle = '';
|
||||
|
||||
foreach((array)$moduleActionInfo->menu as $value)
|
||||
foreach($moduleMenus as $value)
|
||||
{
|
||||
if(is_array($value->acts) && in_array($currentAct, $value->acts))
|
||||
{
|
||||
|
|
@ -113,6 +112,15 @@ class Base extends \ModuleObject
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (!$subMenuTitle && count($moduleMenus))
|
||||
{
|
||||
$subMenuTitle = array_first($moduleMenus)->title;
|
||||
}
|
||||
if (!$subMenuTitle)
|
||||
{
|
||||
$moduleInfo = \ModuleModel::getModuleInfoXml($module);
|
||||
$subMenuTitle = $moduleInfo->title ?? 'Dashboard';
|
||||
}
|
||||
|
||||
// get current menu's srl(=parentSrl)
|
||||
$parentSrl = 0;
|
||||
|
|
@ -145,7 +153,7 @@ class Base extends \ModuleObject
|
|||
Context::set('gnbUrlList', $menu->list);
|
||||
Context::set('parentSrl', $parentSrl);
|
||||
Context::set('gnb_title_info', $gnbTitleInfo ?? null);
|
||||
Context::addBrowserTitle($subMenuTitle ? $subMenuTitle : 'Dashboard');
|
||||
Context::addBrowserTitle($subMenuTitle);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue