您的位置:首页 > 其它

商派BBC系统——会员中心左侧标签嵌套右侧页面方法

2017-03-10 14:54 274 查看

商派BBC系统——会员中心左侧标签嵌套右侧页面方法

新增左侧菜单标签方法:

修改文件 config/usermenu.php

return array(
.....
.....
.....,
array(
'label' => '测试',
'items' => array(
array(
'label' => '测试-index',
'action'=>'topc_ctl_test@index'    // 在路由文件必须添加此方法路由信息,否则报错
),
array('label' => '测试-add','action'=>'topc_ctl_test@add'),
),
),
);


bootstrap/routes.php

.....
.....
......
/*测试*/
route::group(array(), function() {

route::get('member-test-index.html', [ 'as' => 'what', 'uses' => 'topc_ctl_test@index' ]);
route::get('member-test-add.html', [ 'as' => 'what', 'uses' => 'topc_ctl_test@add' ]);
});


效果图



调用页面方式

$this->action_view  //此参数的作用是html页面文件名
最终输出页面情调用 $this->output();


custom/topc/controller/test.php

class topc_ctl_test extends topc_ctl_member {

public function index()
{
$pagedata = array();
$this->action_view = "test/index.html";

// 使用$this->output()函数必须继承topc_ctl_member
return $this->output($pagedata);
}

public function add()
{

}
}


html页面

custom/topc/view/member/test/index.html

Index Page


效果图

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐