I want to set $this->layout to
json in the controller action.
In the
json layout, there will be a line saying $this->Javascript>object(); which will parse through the data given to it by the controller, and output the
jSON.
However, creating a new view file for each
jSON request, eg. recipe_view, ingredient_view isn't necessary, I
…