adrzei Posted August 22, 2015 Report Share Posted August 22, 2015 Hi,Is it possible to return only json on a tab method instead of a complete rendered view? Quote Link to comment Share on other sites More sharing options...
Blesta Addons Posted August 22, 2015 Report Share Posted August 22, 2015 just decode the ouput by json . something like echo $this->outputAsJson($this->view->fetch("your_view_file")); o by var $this->outputAsJson($response); adrzei and serge 2 Quote Link to comment Share on other sites More sharing options...
adrzei Posted August 23, 2015 Author Report Share Posted August 23, 2015 just decode the ouput by json . something like echo $this->outputAsJson($this->view->fetch("your_view_file")); o by var $this->outputAsJson($response); ?? The method outputAsJson() doesn't exist? If I return json string instead of a view, the main view is yet builded. Quote Link to comment Share on other sites More sharing options...
adrzei Posted August 23, 2015 Author Report Share Posted August 23, 2015 Problem solved.Solution: exit(json_encode($arrayOrSomethingElse)); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.