FuelPHP Bin
mypublic.php
<?php class Controller_Mypublic extends \Controller_Hybrid { //public $template = 'public/default'; public $data = array(); public function before() { if (\Input::is_ajax()) { return parent::before(); } // load the theme template $this->theme = \Theme::instance(); $this->theme->set_template($this->template); } public function after($response) { if (!\Input::is_ajax()) { \Theme::instance()->set_info('data', $this->data); if (empty($response)) { $response = \Response::forge(\Theme::instance()); } } return parent::after($response); } }