代码改变世界

帝国CMS列表模板页面IF判断

2017-03-12 17:47  xiangjune  阅读(2167)  评论(0编辑  收藏  举报


$listtemp = '<li class=" g_over">';
$listtemp .= '<a href="[!--titleurl--]" class="img" rel="nofollow" target="_blank" title="[!--title--]">';
if(!empty($r[pic]))
{
$listtemp .= '<img src="[!--pic--]" alt="" title="[!--title--]">';
}
else{
$listtemp .= '<span style="font-size:30px; margin-top:100px; color:#000;">[!--title--]</span>';
}
$listtemp .= '</a>';
$listtemp .= '<div class="goods-padding">';
$listtemp .= '<div class="title">';
$listtemp .= '<a target="_blank" href="[!--titleurl--]" target="_blank">[!--title--]</a>';
$listtemp .= '</div>';
$listtemp .= '</div>';
$listtemp .= '</li>';