找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 202|回复: 0

[cms教程] dedecms用arclist调用于附加表字段的方法

[复制链接]

该用户从未签到

发表于 2021-8-4 09:38:25 | 显示全部楼层 |阅读模式

您需要 登录 才可以下载或查看,没有账号?立即注册

×
要获取附加表内容,必须符合两个条件
         
        1、指定 channelid 属性
        2、指定要获得的字段 addfields='字段1,字段'
        如:
         
       
               
                       
                               
                                       
{dede:arclist addfields='filetype,language,softtype' row='8' channelid='3'}
[field:textlink /, - [field:softtype /,
{/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 = title
        typelink = typename
        imglink =


        image =

                               
登录/注册后可看大图


        字段调用方法:[field:varname/,
        如:
        {dede:arclist infolen='100'}
        [field:textlink/,
       

        [field:infos/,
       

        {/dede:arclist}
        注:底层模板里的Field实现也是织梦标记的一种形式,因此支持使用PHP语法,Function扩展等功能。
        如: 给当天发布的内容加上 (new) 标志
        [field:senddate runphp='yes',
        $ntime = time();
        $oneday = 3600 * 24;
        if(($ntime - @me)
        else @me = "";
        [/field:senddate,
回复

使用道具 举报

网站地图|页面地图|文字地图|Archiver|手机版|小黑屋|找资源 |网站地图

GMT+8, 2024-10-10 13:19

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表