diff --git a/application/controllers/information.php b/application/controllers/information.php index ebfe26d9..83989955 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -1148,11 +1148,26 @@ class Information extends CI_Controller $breadcrumb_data = $this->Information_model->get_path_exclude_self($information->is_id, $information->is_path); $ads_by_google = !empty(get_meta($information->ic_id, 'meta_google_ad_article')); $data['ads_by_google'] = $ads_by_google; - $data['author'] = $this->Operator_model->get_author_nikename($information->ic_author); //获取作者信息 + $author = $this->Operator_model->get_author_nikename($information->ic_author); //获取作者信息 + $data['author'] = $author; $data['breadcrumb_data'] = $breadcrumb_data; $template_H1 = $this->load->view($template_path . '-h1', $data, TRUE); $template = str_replace('', $template_H1, $template); - + // 结构化标签:Article + $article_structured_data_content = $this->load->view( + $template_path . '-structured-data-article', + array('information' => $information, 'author' => $author), + true); + $template = str_replace('', $article_structured_data_content, $template); + // 结构化标签:BreadcrumbList + $breadcrumb_structured_data_content = $this->load->view( + $template_path . '-structured-data-breadcrumb', + array('breadcrumb_data' => $breadcrumb_data, 'information' => $information), + true); + $template = str_replace( + '', + $breadcrumb_structured_data_content, + $template); //推荐信息或者产品 //信息推荐 diff --git a/application/views/mobile_first/ah-pc.php b/application/views/mobile_first/ah-pc.php index 1bbf31e4..eed8f2c7 100644 --- a/application/views/mobile_first/ah-pc.php +++ b/application/views/mobile_first/ah-pc.php @@ -401,6 +401,7 @@ } } + + - \ No newline at end of file diff --git a/application/views/mobile_first/ah-structured-data-article.php b/application/views/mobile_first/ah-structured-data-article.php new file mode 100644 index 00000000..2b03ebbe --- /dev/null +++ b/application/views/mobile_first/ah-structured-data-article.php @@ -0,0 +1,28 @@ + \ No newline at end of file diff --git a/application/views/mobile_first/ah-structured-data-breadcrumb.php b/application/views/mobile_first/ah-structured-data-breadcrumb.php new file mode 100644 index 00000000..99083f6b --- /dev/null +++ b/application/views/mobile_first/ah-structured-data-breadcrumb.php @@ -0,0 +1,28 @@ + \ No newline at end of file diff --git a/application/views/mobile_first/ah.php b/application/views/mobile_first/ah.php index 47b66194..1a41f23f 100644 --- a/application/views/mobile_first/ah.php +++ b/application/views/mobile_first/ah.php @@ -371,5 +371,7 @@ } } + + \ No newline at end of file