信息推荐显示

ct-mobile-first
ycc 5 years ago
parent 6329909c52
commit df9391d4a7

@ -633,6 +633,7 @@ class Information extends CI_Controller
if(empty($data['info_howtoplan'])){//找不到对应信息则显示备用 if(empty($data['info_howtoplan'])){//找不到对应信息则显示备用
$data['info_howtoplan']=$this->Information_model->Detail('/travelguide/plan-first-trip.htm'); $data['info_howtoplan']=$this->Information_model->Detail('/travelguide/plan-first-trip.htm');
} }
$data['info_howtoplan_root']=$this->Information_model->get_detail_by_path($data['info_howtoplan']->is_path,1);//信息所属分类,获取信息顶级节点内容
if(!empty($data['info_howtoplan'])){ if(!empty($data['info_howtoplan'])){
if(empty($data['info_howtoplan']->ic_photo)){ if(empty($data['info_howtoplan']->ic_photo)){
$images=get_image_url_by_source($data['info_howtoplan']->ic_content); $images=get_image_url_by_source($data['info_howtoplan']->ic_content);
@ -648,6 +649,7 @@ class Information extends CI_Controller
if(empty($data['info_besttime'])){ if(empty($data['info_besttime'])){
$data['info_besttime']=$this->Information_model->Detail('/weather/china-best-times.htm'); $data['info_besttime']=$this->Information_model->Detail('/weather/china-best-times.htm');
} }
$data['info_besttime_root']=$this->Information_model->get_detail_by_path($data['info_besttime']->is_path,1);//信息所属分类,获取信息顶级节点内容
if(!empty($data['info_besttime'])){ if(!empty($data['info_besttime'])){
if(empty($data['info_besttime']->ic_photo)){ if(empty($data['info_besttime']->ic_photo)){
$images=get_image_url_by_source($data['info_besttime']->ic_content); $images=get_image_url_by_source($data['info_besttime']->ic_content);
@ -663,6 +665,7 @@ class Information extends CI_Controller
if(empty($data['info_topthings'])){ if(empty($data['info_topthings'])){
$data['info_topthings']=$this->Information_model->Detail('/travelguide/article-top-china-tourist-destination.htm'); $data['info_topthings']=$this->Information_model->Detail('/travelguide/article-top-china-tourist-destination.htm');
} }
$data['info_topthings_root']=$this->Information_model->get_detail_by_path($data['info_topthings']->is_path,1);//信息所属分类,获取信息顶级节点内容
if(!empty($data['info_topthings'])){ if(!empty($data['info_topthings'])){
if(empty($data['info_topthings']->ic_photo)){ if(empty($data['info_topthings']->ic_photo)){
$images=get_image_url_by_source($data['info_topthings']->ic_content); $images=get_image_url_by_source($data['info_topthings']->ic_content);
@ -681,6 +684,7 @@ class Information extends CI_Controller
if(empty($data['info_hotel'])){ if(empty($data['info_hotel'])){
$data['info_hotel']=$this->Information_model->Detail('/travelguide/most-beautiful-places.htm'); $data['info_hotel']=$this->Information_model->Detail('/travelguide/most-beautiful-places.htm');
} }
$data['info_hotel_root']=$this->Information_model->get_detail_by_path($data['info_hotel']->is_path,1);//信息所属分类,获取信息顶级节点内容
if(!empty($data['info_hotel'])){ if(!empty($data['info_hotel'])){
if(empty($data['info_hotel']->ic_photo)){ if(empty($data['info_hotel']->ic_photo)){
$images=get_image_url_by_source($data['info_hotel']->ic_content); $images=get_image_url_by_source($data['info_hotel']->ic_content);

@ -1,12 +1,5 @@
<div class=topcontent> <div class=topcontent>
<?php if(!empty($ic_photo)) { ?>
<div class="infotopimage">
<img src="<?php echo 'https://images.chinahighlights.com'.$ic_photo; ?>"
alt="<?php echo !empty($ic_title)?$ic_title:'H1 title Chinahighlights mobile first template'; ?>" class="img-responsive">
</div>
<?php } ?>
<div class="infocategory"><?php echo !empty($infocategory)?$infocategory->ic_url_title:'infocategory'; ?></div> <div class="infocategory"><?php echo !empty($infocategory)?$infocategory->ic_url_title:'infocategory'; ?></div>
<h1><?php echo !empty($ic_title)?$ic_title:'H1 title Chinahighlights mobile first template'; ?></h1> <h1><?php echo !empty($ic_title)?$ic_title:'H1 title Chinahighlights mobile first template'; ?></h1>
<!--<p class="subheadline">to do</p> --> <!--<p class="subheadline">to do</p> -->

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

Loading…
Cancel
Save