/** * Stores the name of the default theme to use. This theme should be relative * to one of the template.theme_paths folders. * * @param string $theme The name of the desired default theme to use. * * @return void */ public static function set_default_theme($theme = null) { if (empty($theme) || !is_string($theme)) { return; } // Make sure a trailing slash is there if (substr($theme, -1) !== '/') { $theme .= '/'; } self::$default_theme = $theme; }
public static function init() { // If the application config file hasn't been loaded, do it now if (!self::$ci->config->item('template.theme_paths')) { self::$ci->config->load('application'); } // Store our settings self::$site_path = self::$ci->config->item('template.site_path'); self::$theme_paths = self::$ci->config->item('template.theme_paths'); self::$layout = self::$ci->config->item('template.default_layout'); self::$default_theme = self::$ci->config->item('template.default_theme'); self::$parse_views = self::$ci->config->item('template.parse_views'); // Store our orig view path, so we can reset it self::$orig_view_path = self::$ci->load->_ci_view_path; log_message('debug', 'Template library loaded'); }