要获取附加表内容,必须符合两个条件

1、指定 channelid 属性
2、指定要获得的字段 addfields='字段1,字段'
如:
{dede:arclist addfields='filetype,language,softtype' row='8' channelid='3'}
[field:textlink /]-[field:softtype /]<br />
{/dede:arclist}


底层模板字段:
ID(同 id),typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,
source,litpic(同picname),pubdate,senddate,mid, lastpost,scores,goodpost,badpost,notpost,
description(同infos),filename, image, imglink, fulltitle, textlink, typelink,plusurl, memberurl, templeturl,
stime(pubdate 的"0000-00-00"格式)
其中:
textlink = <a href='arcurl'>title</a>
typelink = <a href='typeurl'>typename</a>
imglink = <a href='arcurl'><img src='picname' border='0' width='imgwidth' height='imgheight'></a>
image = <img src='picname' border='0' width='imgwidth' height='imgheight' alt=’titile’>
字段调用方法:[field:varname/]
如:
{dede:arclist infolen='100'}
[field:textlink/]
<br>
[field:infos/]
<br>
{/dede:arclist}
注:底层模板里的Field实现也是织梦标记的一种形式,因此支持使用PHP语法,Function扩展等功能。
如: 给当天发布的内容加上(new)标志
[field:senddate runphp='yes']
$ntime = time();
$oneday = 3600 * 24;
if(($ntime-@me)<$oneday) @me = "<font color='red'>(new)</font>";
else @me = "";
[/field:senddate]

[b][/b]

免责声明:本站所有文章和图片均来自用户分享和网络收集,文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服处理。

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。