后台内页顶部导航菜单

2022-09-27 11:26 0

内页顶部导航菜单,如下图所示位置:

后台内页顶部导航菜单


在控制器中的定义方式:
\Phpcmf\Service::V()->assign([
 'menu' => \Phpcmf\Service::M('auth')->_admin_menu(
  [
   '菜单名称' => ['app目录/控制器名/方法名', 'fa fa-folder icon图标'],
   '菜单名称2' => ['app目录/控制器名/方法名', 'fa fa-folder icon图标'], // 支持多组菜单
  ]
 ),
]);


附带参数的地址:
\Phpcmf\Service::V()->assign([
 'menu' => \Phpcmf\Service::M('auth')->_admin_menu(
  [
   '菜单名称' => ['test/test/index{参数1=值1&参数2=值2}', 'fa fa-folder'],
  ]
 ),
]);


弹出窗口储存地址:

后台内页顶部导航菜单

\Phpcmf\Service::V()->assign([
 'menu' => \Phpcmf\Service::M('auth')->_admin_menu(
  [
   '菜单名称' => ['add:test/test/index', 'fa fa-folder', '500px', '400px'], // 500和400是高宽度
  ]
 ),
]);


跳转新页面方式:
\Phpcmf\Service::V()->assign([
 'menu' => \Phpcmf\Service::M('auth')->_admin_menu(
  [
   '菜单名称' => ['blank:test/test/index', 'fa fa-folder'], // 在浏览器新标签打开
  ]
 ),
]);


ajax请求结果地址:

后台内页顶部导航菜单

\Phpcmf\Service::V()->assign([
 'menu' => \Phpcmf\Service::M('auth')->_admin_menu(
  [
   '菜单名称' => ['ajax:test/test/index', 'fa fa-folder'], // 访问时会发起ajax请求,并提示结果
  ]
 ),
]);


帮助链接地址:
\Phpcmf\Service::V()->assign([
 'menu' => \Phpcmf\Service::M('auth')->_admin_menu(
  [
   'help' => [888], // 888跳转到官网手册的地址 help.xunruicms.com/888.html
  ]
 ),
]);




咨询
微信
电话