how to make multi version in codeigniter for mobile and desktop |
(11-11-2017, 12:37 PM)PaulD Wrote: I think the docs are pretty clear on this. Thanks for the help in apps\third_party\MX\Loader We made these change : public function view($view, $vars = array(), $return = FALSE) { $this->load->library('user_agent'); if ($this->agent->is_mobile()) { list($path, $view) = Modules::find($view, $this->_module, 'mobile_views/'); } else { list($path, $view) = Modules::find($view, $this->_module, 'views/'); } function _ci_load($_ci_data) { foreach (array('_ci_view', '_ci_vars', '_ci_path', '_ci_return') as $_ci_val) { $$_ci_val = ( ! isset($_ci_data[$_ci_val])) ? FALSE : $_ci_data[$_ci_val]; } if ($_ci_path == '') { $_ci_file = strpos($_ci_view, '.') ? $_ci_view : $_ci_view.EXT; $_ci_path = $this->_ci_view_path.$_ci_file; } else { $_ci_file = end(explode('/', $_ci_path)); } if ( ! file_exists($_ci_path)) show_error('Unable to load the requested file: '.$_ci_file); if (is_array($_ci_vars)) $this->_ci_cached_vars = array_merge($this->_ci_cached_vars, $_ci_vars); extract($this->_ci_cached_vars); ob_start(); if ((bool) @ini_get('short_open_tag') === FALSE AND CI::$APP->config->item('rewrite_short_tags') == TRUE) { echo eval('?>'.preg_replace("/;*\s*\?>/", "; ?>", str_replace('<?=', '<?php echo ', file_get_contents($_ci_path)))); } else { include($_ci_path); } log_message('debug', 'File loaded: '.$_ci_path); if ($_ci_return == TRUE) return ob_get_clean(); if (ob_get_level() > $this->_ci_ob_level + 1) { ob_end_flush(); } else { CI::$APP->output->append_output(ob_get_clean()); } } And the following code has control functions : $data['include']='article/view_article'; $this->load->view('container',$data); But this message is displayed: Unable to load the requested file: container.php You can get more guidance Thank a lot edram |
Messages In This Thread |
how to make multi version in codeigniter for mobile and desktop - by edram - 11-11-2017, 10:53 AM
RE: how to make multi version in codeigniter for mobile and desktop - by PaulD - 11-11-2017, 12:37 PM
RE: how to make multi version in codeigniter for mobile and desktop - by edram - 11-12-2017, 02:35 AM
RE: how to make multi version in codeigniter for mobile and desktop - by scalla - 11-12-2017, 12:43 PM
|