I have created one function to fetch the user inbox message and display it using “user-profile-messages” templates.
Also I have added functionality (in the same function) to deleting bulk inbox message if user clicked on delete all button.
But after deleting all messages, page/template is not redering. Please let me know what could be the reason.
I am rendering page using below method.
$this->template->body = View::factory("user-profile-messages", array(
"msg" => $msg,
"messages" => $messages,
))->render();
I am using Kohana latest version.
First of all, if you’re not extending the template controller, then your code should be:
Output is set by
$this->response->body($view). Calling render isn’t needed as it has a __toString method.If you’re extending the template controller, which it looks like you are. It renders output automatically unless you explicity tell it not to:
By default, it’s going to render the template template with a variable body which will contain your view.