diff --git a/application/controllers/information.php b/application/controllers/information.php index 8a30f117..df957357 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -603,6 +603,25 @@ class Information extends CI_Controller return false; } + //生成静态文件 $template='mobile' or 'pc' + function make_www_cache($template,$information){ + $data = array(); + switch ($template){ + case 'mobile': + //获取移动优先的模板,如果有的话 + $mobile_first_template_path = 'mobile_first/' . $this->config->item('site_code'); + if (is_file(APPPATH . 'views/' . $mobile_first_template_path . EXT)) { + $mobile_template = $this->load->view($mobile_first_template_path, '', TRUE); + } else { + return false; + } + break; + case 'pc': + break; + default: + } + } + function make_mobile_html($information) { $data = array(); @@ -784,7 +803,7 @@ class Information extends CI_Controller ); $data['info_hotel'] = $this->Information_model->Detail($random_array[rand(0, count($random_array) - 1)]); if (!empty($data['info_hotel'])) { - $data['info_hotel_root'] = $this->Information_model->get_detail_by_path($data['info_hotel_root']->is_path, 1); + $data['info_hotel_root'] = $this->Information_model->get_detail_by_path($data['info_hotel']->is_path, 1); $data['info_hotel']->ic_photo = $this->set_photo_content($data['info_hotel']->ic_photo, $data['info_hotel']->ic_content); } break;