登录1秒注册

蝉网

搜索
站长论坛»主页›首页休闲>dedecms用arclist调用于附加表字段的方法 因此支持使用PHP语法
查看:9
回复:1
打印上一主题下一主题

[蝉网]dedecms用arclist调用于附加表字段的方法 因此支持使用PHP语法

[复制链接]
跳转到指定楼层
楼主

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

1、调段指定要获得的附加方法字段 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]

指定 channelid 属性

2、附加方法

使用道具举报

您需要登录后才可以回帖 登录 | 1秒注册

站长论坛积分规则

辽ICP备1743375053号-2|Archiver|手机版|小黑屋|站长论坛

GMT+8, 2026-11-23 , Processed in 0.295106 second(s), 188 queries .

Powered by 蝉网

© 本站内容均为会员发表,并不代表本站长论坛立场!

返回顶部