FuelPHP Bin
admin.php
<?php class Controller_Admin extends Controller_Hybrid { public $current_user = null; protected $_current_theme = null; public function before() { parent::before(); $theme_cfg = \Config::load('themes_backend', 'admin_theme', false, true); $this->theme = \Theme::forge($theme_cfg); $this->_current_theme = $this->theme->active(); // $base_tpl_path = $this->_current_theme['info']['master_tpl'].$theme_cfg['view_ext']; //-> base_template.php $base_tpl_rel_path = '..'.DS.'themes'.DS.'back-end'.DS.$this->_current_theme['name'].DS.$this->_current_theme['info']['master_tpl'].$theme_cfg['view_ext']; //-> '../themes/fron-end/<THEME_NAME>/base_template.php' /* * $this->theme->set_template($base_tpl_path) DIND'T work, since set_template() uses View::forge() and, by default, it tries to find the template under APPPATH/views */ $this->theme->set_template( $base_tpl_rel_path ); $this->template = $this->theme->get_template(); } /** * The index action. * * @access public * @return void */ public function action_dashboard() { /** * ...no dynamic data, just layout with some hard-coded data */ $this->template->page_title = 'Dashboard'; } }