织梦dedecms怎么判断文章是否包含某个属性

例如想给有头条属性的文章前面加"头条"两个字
在dede:arclist或者dede:list标签中,调用下面这行代码,判断flag这个字段的值,是否包含h属性

[field:flag runphp='yes']
$a=explode(',','@me');
if($a[0]=='h'){
@me='<lable style="color: white;background: #FF5722;padding: 2px 4px;border-radius: 5px;">头条</lable>';
}else{
@me='';
}
[/field:flag]

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: