diff --git a/application/controllers/information.php b/application/controllers/information.php index 94216cb6..c67ddc8b 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -626,6 +626,9 @@ class Information extends CI_Controller $template = str_replace('', '', $template); $inquiry_form_template = $this->load->view($template_path . '-inquiry-form', array('meta_product_code'=>$meta_product_code), true); $information->ic_content = str_replace('', $inquiry_form_template, $information->ic_content); + + $breadcrumb_content = $this->load->view($template_path . '-breadcrumb', array('breadcrumb_data'=>$breadcrumb_data), true); + $information->ic_content = str_replace('', $breadcrumb_content, $information->ic_content); } //顶部全屏大图 if ($device == 'mobile') { //移动端读取移动大图 diff --git a/application/models/information_model.php b/application/models/information_model.php index 876a5b86..1feec947 100644 --- a/application/models/information_model.php +++ b/application/models/information_model.php @@ -140,34 +140,69 @@ class Information_model extends CI_Model { } /** - * 获取当前节点的到最顶层的路径,不包括当前节点 + * 获取当前页面的面包屑,不包括当前节点 */ function get_path_exclude_self($is_id, $path) { $site_code = $this->config->item('site_code'); - $path_query = $this->HT->query("select ic_id, is_id, ic_url,ic_url_title,ic_title,is_path + $path_query = $this->HT->query("select + ic_id, is_id, ic_url,ic_url_title,ic_title,is_path,is_level,ic_status from infoStructures a inner join infoContents b on a.is_ic_id=b.ic_id where is_id in ($path 0) and is_id <> ? and is_siteCode = ? order by is_level asc", array($is_id, $site_code)); $path_result = $path_query->result(); $path_list = []; + $group_map = [ + 27800801 => [ + 'ic_url' => '/travelguide/culture/', + 'ic_url_title' => 'Chinese Culture' + ], + 278008011 => [ + 'ic_url' => '/travelguide/', + 'ic_url_title' => 'Travel Guide' + ], + 278008012 => [ + 'ic_url' => '/aboutus/', + 'ic_url_title' => 'About Us' + ], + 278008013 => [ + 'ic_url' => '/citytour/', + 'ic_url_title' => 'City Tours' + ], + 278008014 => [ + 'ic_url' => '/tour/', + 'ic_url_title' => 'China Tours' + ] + ]; + foreach ($path_result as $path_row) { $ic_url = $path_row->ic_url; $ic_url_title = $path_row->ic_url_title; - if ($path_row->is_id === 278008010) { - $ic_url = '/inspiration'; - $ic_url_title = 'inspiration title'; + if ($path_row->is_level === 0) { + if (array_key_exists($path_row->is_id, $group_map)) { + $top_group = $group_map[$path_row->is_id]; + $path_array = [ + 'ic_id' => $path_row->ic_id, + 'is_id' => $path_row->is_id, + 'ic_title' => $path_row->ic_title, + 'ic_url' => $top_group['ic_url'], + 'ic_url_title' => $top_group['ic_url_title'] + ]; + $path_list[] = $path_array; + } + } else if ($path_row->ic_status === 1) { + + $path_array = [ + 'ic_id' => $path_row->ic_id, + 'is_id' => $path_row->is_id, + 'ic_title' => $path_row->ic_title, + 'ic_url' => $path_row->ic_url, + 'ic_url_title' => $path_row->ic_url_title + ]; + $path_list[] = $path_array; + } - - $path_array = [ - 'ic_id' => $path_row->ic_id, - 'is_id' => $path_row->is_id, - 'ic_title' => $path_row->ic_title, - 'ic_url' => $ic_url, - 'ic_url_title' => $ic_url_title - ]; - $path_list[] = $path_array; } return $path_list; diff --git a/application/views/mobile_first/ch-breadcrumb.php b/application/views/mobile_first/ch-breadcrumb.php new file mode 100644 index 00000000..f8830f59 --- /dev/null +++ b/application/views/mobile_first/ch-breadcrumb.php @@ -0,0 +1,6 @@ +
+Home + $item) {?> + + +
\ No newline at end of file diff --git a/application/views/mobile_first/ch-h1.php b/application/views/mobile_first/ch-h1.php index 6b979a29..80297181 100644 --- a/application/views/mobile_first/ch-h1.php +++ b/application/views/mobile_first/ch-h1.php @@ -7,14 +7,12 @@ -
- Why choose China Highlights +
+
Your Wellbeing is Our Priority
+ +
Your Wellbeing is Our Priority.
+ +
Your Trip is Perfectly Planned.
+ +
Your Booking is Risk-Free.
+ +