GH 新增标签 <!--@TIPS-RIGHT-LIST@-->

hotfix/paypal-note
Jimmy Liow 2 years ago
parent e0e19ae926
commit 56a95c5cf7

@ -1430,6 +1430,40 @@ class Information extends CI_Controller
if (!empty($template_recommand['Tips Right'])) {
$template = str_replace('<!--@TIPS-RIGHT@-->', "<div class='right_tour'><div class='ah_inforight'>" . $template_recommand['Tips Right']->it_content . "</div></div>", $template);
}
// 右侧列表广告
$tips_right_a = [];
$tips_right_b = [];
$tips_right_c = [];
for ($i = 1; $i <= 12; $i++) {
$key = 'List Tips Right A_' . $i;
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
$tips_right_a[] = $recommand_information[$key];
}
}
for ($i = 1; $i <= 12; $i++) {
$key = 'List Tips Right B_' . $i;
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
$tips_right_b[] = $recommand_information[$key];
}
}
for ($i = 1; $i <= 12; $i++) {
$key = 'List Tips Right C_' . $i;
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
$tips_right_c[] = $recommand_information[$key];
}
}
$tips_right_list_content = $this->load->view(
'mobile_first/gh-tips-right-list',
array(
'tips_right_a' => $tips_right_a,
'tips_right_b' => $tips_right_b,
'tips_right_c' => $tips_right_c
),
true
);
$template = str_replace('<!--@TIPS-RIGHT-LIST@-->', $tips_right_list_content, $template);
//文中的信息推荐
if (strpos($information->ic_content, '<!--@Content-Recommends-Article@-->') !== false) {
// $information->ic_content = str_replace('<!--@Content-Recommends-Article@-->', $this->load->view($template_path . '-recommends-article', array('recommands' => $template_recommand), TRUE), $information->ic_content);

@ -0,0 +1,26 @@
<div class="right_tour">
<div class="info_ad_title" style="display: flex;">Popular tours</div>
<div class="right_ad_list">
<ul>
<?php foreach ($tips_right_a as $index => $info) {?>
<li><a href="<?php echo $info->ic_url ?>" id="right_ad_list_tours"><?php echo $info->ic_title ?></a></li>
<?php }?>
</ul>
</div>
<div class="info_ad_title" style="display: flex;">Make the most of your time</div>
<div class="right_ad_list">
<ul>
<?php foreach ($tips_right_b as $index => $info) {?>
<li><a href="<?php echo $info->ic_url ?>" id="right_ad_list_plan"><?php echo $info->ic_title ?></a></li>
<?php }?>
</ul>
</div>
<div class="info_ad_title" style="display: flex;">Choose the best time to visit</div>
<div class="right_ad_list">
<ul>
<?php foreach ($tips_right_c as $index => $info) {?>
<li><a href="<?php echo $info->ic_url ?>" id="right_ad_list_weather"><?php echo $info->ic_title ?></a></li>
<?php }?>
</ul>
</div>
</div>
Loading…
Cancel
Save