POST TIME:2017-12-02 21:55
在制作DEDEcms模板中經常會使用自定義字段名,以前很多dede自定義字段都是使用sql方式調用的,今天給大家介紹一種dede自帶的語句調用方法,方法很好很實用,給大家分享下
注:要獲取附加表內容,必須符合兩個條件
1、指定 channelid 屬性
2、指定要獲得的字段 addfields='字段1,字段' 每個字段用英文半角逗號分開
如:
{dede:arclist addfields='goumai,dianpu' row='8' channelid='1'}
[field:goumai /] - [field:dianpu /]
{/dede:arclist}
這樣就好了,把我用的代碼貼到上面,調用的是商品。
{dede:arclist typeid='45' row='8' imgwidth='105' imgheight='105' titlelen='16' addfields='trueprice,price' channelid='6' }
市場價¥[field:price /]
優惠價¥[field:trueprice /]
{/dede:arclist}
document.body.oncopy = function (){ setTimeout(function (){ var text = clipboardData.getData("text"); if (text){ texttext = text + "rn
上一篇:DEDE5.7評論調用標簽大全
下一篇:dedecms自定義字段搜索教程