php - Using actionHelper without returning layout in output -
I call an action helper in one of my views using the following code
Echo $ it-> Action ('af,' 'bar');
In the bar controller, fooAction does its thing and makes a list of pages. However, there is also a layout in the output in this list, which is a powerful irritant. If I disable the layout in the fusion, then the layout is completely disabled on the live side.
I'm bothering me. I could only make a visual assistant, and there are many ways around it, but curiously I was thinking that anyone has the solution.
See API action for action Helper MVC follows Components which invoke controller actions:
action ($ action, $ controller, $ module = zero, array $ params = array ())
.$ action
and$ controller
are required; If no module is specified, then the default module value is assumed.
Modify your controller to accept a param, which should disable the layout of the action or not. When working using assistant, to have this control flag
On a sidenote: Action Wuhelpr is considered bad practice to use because it will be run again through the entire dispatch process and your app Will slow down. If possible.
Comments
Post a Comment