TP3.2的Widget后台传参前台无效

浏览:858 发布日期:2015/03/12 分类:求助交流 关键字: widget 后台传递参数
问题 描述 IndexController 显示 Layout下的two-menu-2index.html。调用 widget\LayoutWidget.class.php 。LayoutWidget控制器的方法 通过 echo可以在two-menu-2index.html显示。但是通过assign赋值,前台无法获取。


看了很多 相关的资料。也对比了相关细节不知道哪里出的错。还请各位大侠指教。
LayoutWidget code:<?php 
namespace Admin\Widget;
use Think\Controller;

/**
* CreateTime:2015-03-12
* UpgradeTime:
* Author:willa
* Document:this is Admin Module Widget Public Widget 
*/
class LayoutWidget extends Controller
{
    
    
    public function getLeftSidebar()
    {
        echo "this is admin";
        $this->assign('menuTest','accp');
        //$this->display('Layout:two-menu-2LeftSidebar');
        //echo "this is Admin Module Widget Public Widget";
        //$this->display('Layout:two-menu-2LeftSidebar');
    }
}
 ?>
最佳答案
评论( 相关
后面还有条评论,点击查看>>