diff --git a/application/controllers/information.php b/application/controllers/information.php index a7676f00..865657e7 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -636,6 +636,8 @@ class Information extends CI_Controller //非产品页面 $meta_product_code = get_meta($information->ic_id, 'meta_product_code'); if (empty($meta_product_code)) { + + $ads_by_google = !empty(get_meta($information->ic_id, 'meta_google_ad_article')); //H1模板替换 $data_H1 = array(); $data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容 @@ -644,6 +646,7 @@ class Information extends CI_Controller $data_H1['ic_title'] = $information->ic_title; $data_H1['ic_photo'] = $information->ic_photo; $data_H1['breadcrumb_data'] = $breadcrumb_data; + $data_H1['ads_by_google'] = $ads_by_google; $template_H1 = $this->load->view($template_path . '-h1', $data_H1, TRUE); $template = str_replace('', $template_H1, $template); @@ -734,10 +737,6 @@ class Information extends CI_Controller //if (!empty(get_meta($information->ic_id, 'meta_google_ad_content'))) { $template = str_replace('', '', $template); //} - if (!empty(get_meta($information->ic_id, 'meta_google_ad_article'))) { - $in_article_google = $this->load->view($template_path . '-google-ad', false, true); - $template = str_replace('', $in_article_google, $template); - } //社媒分享图片 if (!empty($information->ic_photo)) { $full_ic_photo = $this->config->item('site_image_url') . $information->ic_photo; diff --git a/application/views/mobile_first/ch-h1.php b/application/views/mobile_first/ch-h1.php index 69d6424e..c013a896 100644 --- a/application/views/mobile_first/ch-h1.php +++ b/application/views/mobile_first/ch-h1.php @@ -17,5 +17,24 @@
+ + + + + +