feat:Article 增加多张图片

master
LiaoYijun 5 months ago
parent 7281998340
commit c8e6c8ad7a

@ -2266,6 +2266,13 @@ class Information extends CI_Controller {
$breadcrumb_data = $this->Information_model->get_breadcrumb_data($information->is_id, $information->is_path, $group_map);
$ads_by_google = ! empty(get_meta($information->ic_id, 'meta_google_ad_article'));
$meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture');
$meta_addon_picture_mobile = get_meta($information->ic_id, 'meta_addon_picture_mobile');
$article_image_list = [$meta_addon_picture, $meta_addon_picture_mobile];
$article_image_urls = implode(',', $article_image_list);
$data['meta_news_createdate'] = $this->get_publish_date_in_6_month($information);
$data['ads_by_google'] = $ads_by_google;
$data['author'] = ''; //获取作者信息
@ -2288,8 +2295,11 @@ class Information extends CI_Controller {
$template = str_replace('<!--@HEAD_1@-->', $template_H1, $template);
// 结构化标签Article
$article_structured_data_content = $this->load->view(
$template_path . '-structured-data-article',
['information' => $information, 'author_name' => $data['author'], 'author_url' => $author_url],
$template_path . '-structured-data-article', [
'information' => $information,
'author_name' => $data['author'], 'author_url' => $author_url,
'article_image_urls' => $article_image_urls
],
true
);
$template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template);
@ -4306,7 +4316,7 @@ class Information extends CI_Controller {
$DayTripData["InfoData"] = $InfoData; //传递信息平台数据
$linktour = get_meta($information->ic_id, 'meta_trainspread_linktour'); //关联线路
if (! empty($linktour)) {
$paramCode = $productCode . "," . $linktour;

@ -7,9 +7,7 @@
"@id": "https://www.highlightstravel.com<?php echo $information->ic_url; ?>"
},
"headline": "<?php echo $information->ic_seo_title; ?>",
"image": [
"https://images.highlightstravel.com<?php echo $information->ic_photo; ?>"
],
"image": [<?php echo $article_image_urls; ?>],
"datePublished": "<?php echo $information->is_datetime; ?>",
"dateModified": "<?php echo date('Y-m-d\TH:i:s'); ?>",
"author": {

Loading…
Cancel
Save