DedeCms织梦自定义字段为多选checkbox时,前台根据checkbox选择的值,对应输出不同的效果,用runphp解决
POST TIME:2021-05-23 02:33
DedeCms织梦自定义字段为多选checkbox时,前台根据checkbox选择的值,对应输出不同的效果,用runphp解决
{dede:field.banben runphp=yes}
$mytag = explode(',',@me);
$result = '';
for($index=0;$index<count($mytag);$index++){
if($index==2) $result .= "<span class=\&;download-num\&;>$mytag[$index]</span>"; else $result .= "<span class=\&;version\&;>$mytag[$index]</span>";
}
@me = $result;
{/dede:field.banben}
|

上一篇:织梦文章属性增加推荐特荐图标