欢迎来到258分享网,纯净的网络源码分享基地!

258资源分享网

全部作品
全部作品
网站源码
微信源码
素材特效
源码插件
视频教程
建站学院
热门搜索: 织梦  农业种植  农业  安全设置  官方
258资源分享 > 建站学院 > 织梦教程 > dedecms用arclist调用于附加表字段的方法

推荐下载

HTML5响应式自适应网咯设计

2020-05-12   浏览:736

高端HTML5响应式企业通用网

2020-05-06   浏览:517

html5响应式外贸网站英文版

2020-05-08   浏览:505

HTML5自适应律师工作室类网

2020-04-04   浏览:501

HTML5影视传媒文化公司类网

2020-05-12   浏览:495

dedecms用arclist调用于附加表字段的方法

发布时间:2019-12-30  

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

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]

本文标签

:备案管家服务帮您把复杂流程变简单,解决您在进行网站备案过程中遇到的效率低下和成功率不高的问题。个人300/2个域名,企业500/5个域名,qq1650004.