10/04/2012 1:53am

PHP | Working Example - Ajax loaded controller example


class PopupPage_Controller extends Page_Controller {

public function init() {
if(Director::is_ajax()){
$this->isAjax = true;
}
}
public function index() {
if($this->isAjax) return $this->renderWith('ProductPage');
return $this;
}
}


3 Comments 1 Solutions

30/04/2012 1:14pm

PHP | Working Example - sdfsad

sdf


30/04/2012 1:13pm

PHP | Solution - aadsf

asdfasdf


10/04/2012 1:56am

PHP | Comment - Anonymous

Hmm, 'ProductPage' should be 'LayoutTemplate'

$this->renderWith('Layout/PopupPage');

Post Comment