DedeCms織夢自定義字段為多選checkbox時,前臺根據checkbox選擇的值,對應輸出不同的效果,用runphp解決
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} |
新聞熱點
疑難解答