dongmu6225 2018-10-11 10:20
浏览 77

Yii2 - 在adminlte left.php布局中声明$ variable的地方

everything is in the title :)

I'm using superb adminlte theme for my app, and i'm trying to use variable into menu located on the left.

This menu is part of the aminlte layouts, and this view is called left.php.

I don't know where to declare $variable to be used into view left.php ?

Thanks in advance for your help.


  • 写回答

1条回答 默认 最新

  • doule6314 2018-10-13 19:44

    Honestly i'am not sure what the actual question is exactly about, but since you talk about menu let me guess you are trying to mess with menuitems.

    I can only suggest creating your own Helper class and include it in index.php config

    Yii::$classMap['yii\helpers\MenuHelper'] = '@app/helpers/MenuHelper.php';

    and then simply call it like


    inside left.php

    maybe this will help you:

    本回答被题主选为最佳回答 , 对您是否有帮助呢?



  • ¥15 C++ /QT 内存权限的判断函数列举
  • ¥15 深度学习GFnet理解问题
  • ¥15 单细胞小提琴堆叠图代码
  • ¥80 LS dyna mpp并行报错
  • ¥50 升级strust2版本到2.3.15.1后使用ognl3.0.6.jar windows环境中没有问题,但部署到linux环境报错
  • ¥15 vue页面,node封装接口
  • ¥15 求TMS320F280039C工程模板!
  • ¥15 delphi+fastreport实现分组补空打印问题
  • ¥15 使用python把两台mysql数据库服务器数据导出和导入
  • ¥15 NodeBB论坛配置Apache Solr中文搜索引擎的详细教程