/** * If the request is an AJAX request then the template is * stripped out from the response, and only the content is * returned. */ public function after() { if (Request::$is_ajax) { $this->request->response = $this->template->content; } else { parent::after(); } }
public function after() { if ($this->auto_render === TRUE) { $this->view->set_filename($this->request->directory() . DIRECTORY_SEPARATOR . $this->request->controller() . DIRECTORY_SEPARATOR . $this->request->action()); $this->template->content = $this->view; } parent::after(); }
public function after() { if ($this->auto_render) { // Get the media route $media = Route::get('docs/media'); // Add styles $this->template->styles = array($media->uri(array('file' => 'css/print.css')) => 'print', $media->uri(array('file' => 'css/screen.css')) => 'screen', $media->uri(array('file' => 'css/kodoc.css')) => 'screen', $media->uri(array('file' => 'css/shCore.css')) => 'screen', $media->uri(array('file' => 'css/shThemeKodoc.css')) => 'screen'); // Add scripts $this->template->scripts = array($media->uri(array('file' => 'js/jquery.min.js')), $media->uri(array('file' => 'js/kodoc.js')), $media->uri(array('file' => 'js/shCore.js')), $media->uri(array('file' => 'js/shBrushPhp.js'))); // Add languages $this->template->translations = Kohana::message('userguide', 'translations'); } return parent::after(); }
public function after() { $this->main_nav(); parent::after(); }
public function after() { $this->template->user = $this->_user; parent::after(); }