推荐信息显示h1标题

ct-mobile-first
ycc 5 years ago
parent ae5bc42631
commit 2f9992fe01

@ -329,7 +329,7 @@ class Information extends CI_Controller
//获取移动优先的模板,如果有的话
$mobile_first_template_path='mobile_first/'.$this->config->item('site_code');
if(is_file(APPPATH.'views/'.$mobile_first_template_path.EXT)){
$mobile_template_H1=$this->call_mobile_template_H1($mobile_first_template_path,$data['information']->is_parent_id,$data['information']->ic_author,$data['information']->ic_title,$data['information']->ic_photo);//H1模板替换
$mobile_template_H1=$this->call_mobile_template_H1($mobile_first_template_path,$data['information']->is_path,$data['information']->ic_author,$data['information']->ic_title,$data['information']->ic_photo);//H1模板替换
$data['mobile_first_template']=$this->load->view($mobile_first_template_path, '', TRUE);
$data['mobile_first_template']=str_replace('<!--@HEAD_1@-->', $mobile_template_H1, $data['mobile_first_template']);
}else{
@ -571,7 +571,7 @@ class Information extends CI_Controller
$mobile_template=str_replace('<!--@DESCRIPTION@-->', $this->input->post('ic_seo_description'), $mobile_template);
$mobile_template=str_replace('<!--@KEYWORDS@-->', $this->input->post('ic_seo_keywords'), $mobile_template);
$mobile_template=str_replace('<!--@CANONICAL@-->', $this->input->post('site_url').$this->input->post('ic_url'), $mobile_template);
$mobile_template_H1=$this->call_mobile_template_H1($mobile_first_template_path,$this->input->post('is_parent_id'),$this->input->post('ic_author'),$this->input->post('ic_title'),$this->input->post('ic_photo'));//H1模板替换
$mobile_template_H1=$this->call_mobile_template_H1($mobile_first_template_path,$this->input->post('is_path'),$this->input->post('ic_author'),$this->input->post('ic_title'),$this->input->post('ic_photo'));//H1模板替换
$mobile_template=str_replace('<!--@HEAD_1@-->', $mobile_template_H1, $mobile_template);
$mobile_template=str_replace('<!--@CUSTOM-CONENT@-->', $this->input->post('ic_content'), $mobile_template);
$template_NEXT=$this->call_mobile_template_NEXT($mobile_first_template_path,$this->input->post('is_id'));
@ -606,7 +606,7 @@ class Information extends CI_Controller
$template=str_replace('<!--@DESCRIPTION@-->', $this->input->post('ic_seo_description'), $template);
$template=str_replace('<!--@KEYWORDS@-->', $this->input->post('ic_seo_keywords'), $template);
$template=str_replace('<!--@CANONICAL@-->', $this->input->post('site_url').$this->input->post('ic_url'), $template);
$template_H1=$this->call_mobile_template_H1($template_path,$this->input->post('is_parent_id'),$this->input->post('ic_author'),$this->input->post('ic_title'),$this->input->post('ic_photo'));//H1模板替换
$template_H1=$this->call_mobile_template_H1($template_path,$this->input->post('is_path'),$this->input->post('ic_author'),$this->input->post('ic_title'),$this->input->post('ic_photo'));//H1模板替换
$template=str_replace('<!--@HEAD_1@-->', $template_H1, $template);
$template=str_replace('<!--@CUSTOM-CONENT@-->', $this->input->post('ic_content'), $template);
$template_NEXT=$this->call_mobile_template_NEXT($template_path,$this->input->post('is_id'));
@ -627,8 +627,8 @@ class Information extends CI_Controller
file_put_contents($html_path, $template, LOCK_EX);
}
function call_mobile_template_H1($mobile_first_template_path,$is_parent_id,$ic_author,$ic_title,$ic_photo){
$data['infocategory']=$this->Information_model->Detail($is_parent_id);//信息所属分类获取信息父级节点url title
function call_mobile_template_H1($mobile_first_template_path,$is_path,$ic_author,$ic_title,$ic_photo){
$data['infocategory']=$this->Information_model->get_detail_by_path($is_path,1);//信息所属分类,获取信息顶级节点内容
$data['author']=$this->Operator_model->get_author_nikename($ic_author);//获取作者信息
$data['ic_title']=$ic_title;
$data['ic_photo']=$ic_photo;

@ -7,7 +7,7 @@
<a href="<?php echo $info_howtoplan->ic_url; ?>" rel="nofollow"><img
src="<?php echo $info_howtoplan->ic_photo; ?>"
alt="<?php echo $info_howtoplan->ic_title; ?>" class="img-responsive"></a>
<span class="categorycenter"><?php echo $info_howtoplan_root->ic_url_title; ?></span>
<span class="categorycenter"><?php echo $info_howtoplan_root->ic_title; ?></span>
<span class="articlenexttitle"><a
href="<?php echo $info_howtoplan->ic_url; ?>"><?php echo $info_howtoplan->ic_url_title; ?></a></span>
</div>
@ -18,7 +18,7 @@
<a href="<?php echo $info_besttime->ic_url; ?>" rel="nofollow"><img
src="<?php echo $info_besttime->ic_photo; ?>"
alt="<?php echo $info_besttime->ic_title; ?>" class="img-responsive"></a>
<span class="categorycenter"><?php echo $info_besttime_root->ic_url_title; ?></span>
<span class="categorycenter"><?php echo $info_besttime_root->ic_title; ?></span>
<span class="articlenexttitle"><a
href="<?php echo $info_besttime->ic_url; ?>"><?php echo $info_besttime->ic_url_title; ?></a></span>
</div>
@ -29,7 +29,7 @@
<a href="<?php echo $info_topthings->ic_url; ?>" rel="nofollow"><img
src="<?php echo $info_topthings->ic_photo; ?>"
alt="<?php echo $info_topthings->ic_title; ?>" class="img-responsive"></a>
<span class="categorycenter"><?php echo $info_topthings_root->ic_url_title; ?></span>
<span class="categorycenter"><?php echo $info_topthings_root->ic_title; ?></span>
<span class="articlenexttitle"><a
href="<?php echo $info_topthings->ic_url; ?>"><?php echo $info_topthings->ic_url_title; ?></a></span>
</div>
@ -40,7 +40,7 @@
<a href="<?php echo $info_hotel->ic_url; ?>" rel="nofollow"><img
src="<?php echo $info_hotel->ic_photo; ?>"
alt="<?php echo $info_hotel->ic_title; ?>" class="img-responsive"></a>
<span class="categorycenter"><?php echo $info_hotel_root->ic_url_title; ?></span>
<span class="categorycenter"><?php echo $info_hotel_root->ic_title; ?></span>
<span class="articlenexttitle"><a
href="<?php echo $info_hotel->ic_url; ?>"><?php echo $info_hotel->ic_url_title; ?></a></span>
</div>

Loading…
Cancel
Save