开发者

Bypass default view, Kohana

I want to return a view, however Kohana forces 开发者_C百科it through the default view, which I don't want. How do I temporary disable the default view?


As zombor comments, if you are really talking about the template controller, you can disable its rendering by putting this line in your controller:

$this->auto_render = FALSE;


 public function action_index()
    {
        $user_view = $this->getUserView();

        $this->request->response = View::factory('templates/main',$user_view);
    }
public function getUserView($user_details)
    {
        $user_view['list_page'] = View::factory('templates/usermgt')
                        ->bind('user_detail','data')
                        ->bind('msg','test');
        return $user_view;
    }

where getUserView() returns the view page, to action index. hope it matches ur requirement

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜