以下方法僅適合在list之內(nèi)使用的自定義字段,默認(rèn)我們按return=t為例演示
單選按鈕字段: danxuananniu
選擇值:{$t.danxuananniu} 選擇的名稱: {php $field = dr_field_options_id('自定義字段id號(hào)');} {$field[$t.danxuananniu]}
下拉選擇字段: xialaxuanze
<p>選擇值:{$t.xialaxuanze} </p> <p>選擇的名稱: {php $field = dr_field_options_id('自定義字段id號(hào)');} {$field[$t.xialaxuanze]} </p>
復(fù)選框字段: fuxuankuang
<p>選擇值: {php $fuxuankuang=dr_string2array($t.fuxuankuang);} {loop $fuxuankuang $value} <label class="label label-sm label-default">{$value}</label> {/loop} </p> <p>選擇的名稱: {php $fuxuankuang=dr_string2array($t.fuxuankuang);} {php $field = dr_field_options_id('自定義字段id號(hào)');} {loop $field $name $value} {if in_array($name, $fuxuankuang)} <label class="label label-sm label-default">{$value}</label> {/if} {/loop} </p>
城市聯(lián)動(dòng)選擇字段: ldcd
<p>聯(lián)動(dòng)菜單名稱:{dr_linkage('address', $t.ldcd, 0, 'name')}</p> <p>聯(lián)動(dòng)菜單頂級(jí)的名稱:{dr_linkage('address', $t.ldcd, 1, 'name')}</p> <p>面包屑導(dǎo)航:{dr_linkagepos('address', $t.ldcd, ' - ')}</p>
單個(gè)文件上傳: dangewenjian
<p>文件的地址:{dr_get_file($t.dangewenjian)}</p> <p>文件的下載地址:{dr_down_file($t.dangewenjian)}</p> <p>圖片縮略圖200x200:{dr_thumb($t.thumb, 200, 200)}
多個(gè)文件或圖片 : dgwjhtp
{php $dgwjhtp =dr_get_files($t.dgwjhtp);} {loop $dgwjhtp $i $c} <p> 標(biāo)題:{$c.title}<br> 文件原始地址:{dr_get_file($c.file)}<br> 圖片縮略圖:{dr_thumb($c.file, 200, 200)}<hr> </p> {/loop}
圖片專用 : tpzy
{php $tpzy =dr_string2array($t.tpzy);} {loop $tpzy $i $c} <p> 圖片原始地址:{dr_get_file($c.file)}<br> 圖片縮略圖:{dr_thumb($c.file, 200, 200)}<hr> </p> {/loop}
日期時(shí)間格式: inputtime
<p>默認(rèn)輸出:{$t.inputtime}</p> <p>自定義時(shí)間:{dr_date($t._inputtime, 'Y-m-d')}</p> <p>友好的時(shí)間:{dr_fdate($t._inputtime)}</p>
參數(shù)屬性 spsx
{php $spsx =dr_string2array($t.spsx);} {loop $spsx $i $c} <p>{$c.name}:{$c.value}</p> {/loop}
視頻文件 spwj
{php $spwj=dr_string2array($t.spwj);} <p>文件:{dr_get_file($spwj.file)}</p>
顏色選取 ysxqfyb
<p>{$t.ysxqfyb}</p>
百度地圖 baiduditu
{dr_baidu_map($t['baiduditu_lng'].','.$t['baiduditu_lat'], 17, '100%', '400')}
內(nèi)容關(guān)聯(lián)(新聞) nrglxw
{php $nrglxw=dr_string2array($t.nrglxw);} {if $nrglxw} {list action=module module=news IN_id=$nrglxw num=5 return=r} <p><a href="{$r.url}">{$r.title}</a></p> {/list} {else} 沒有關(guān)聯(lián) {/if}
文檔最后更新時(shí)間:2017-12-13 14:06:13