![]() |
|
Snippets |
|
A simple way to detect an ajax request.
In your action class.
$this->isAjaxCall = $this->getRequest()->isXmlHttpRequest();
I put the above line in my preExecute where needed, this way the variable is accessible by action and views.