帝国CMS灵动标签判断是否字段有值
2020-04-10 站长 站长日志
最近项目用到的,帝国CMS灵动标签里套个判断,适用所有相同场景。
帝国CMS灵动标签判断是否字段有值
1 2 3 4 5 6 7 8 |
[e:loop={0,10,3,0}] <? php if($bqr[titlepic]) { $pic = '<a href = "'.$bqsr['titleurl'].'" title = "'.$bqr['title'].'" class = "pic" >< img src = "'.$bqr[titlepic].'" title = "'.$bqr['title'].'" alt = "'.$bqr['title'].'" ></ a >'; } else { $pic = ''; } ?> <?=$pic?> [/e:loop] |