开发者

How to do another action, but still show the same url in browser in cakephp

开发者 https://www.devze.com 2023-04-09 08:42 出处:网络
I want to call another action in cakephp . I want to run all the code in the action and render the view of that action. I know this can be done using $this->开发者_StackOverflowrequestAction(), but

I want to call another action in cakephp . I want to run all the code in the action and render the view of that action. I know this can be done using $this->开发者_StackOverflowrequestAction(), but the problem here is that it is not setting my title for the page which im doing in the called action. And i don't want to use redirect because it changes the url in my browser(ie it sends http 302).


From inside any action, you can manually render any view using $this->render (see api docs). Of course, you'll have to set the variables required on the other view beforehand.

0

精彩评论

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