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

$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>’;

原文链接:https://www.cnblogs.com/xiangjune/p/6538610.html