数字化技能提升教程,数字化时代生存宝典

数字化百科 / 词条 / EXCMS标签 列表标签

EXCMS标签 列表标签

查看全部词条命名空间:Main

导航:返回上一页


EXCMS模板标签介绍,“列表标签”:

channellist栏目列表标签

标签名称:channellist

功能说明:用于获取栏目列表

适用范围:封面模板、列表模板、文档模板

基本语法:{channellist channelid= type= row= item=}{channellistelse}{/channellist}

属性说明


名称


默认值


是否必填


描述




channelid
0

表示栏目ID,在栏目模板和封面模板中不需要指定,在封面模板中允许用","分开表示多个栏目,默认为0,也就是相当于顶级栏目。


type
self

显示类型,nav表示导航栏目 son表示下级栏目,self表示同级栏目,top顶级栏目,cross显示某栏目下交叉栏目,sub:包含子栏目,默认为self。


row
所有

表示显示栏目数量。


item


通过item属性可访问channellist标签自身的属性,channellist中的item属性包含了当前栏目表的所有字段信息,channellist自身属性可以通过{$name.property}访问,其中"$name"是item指定的变量名称,property是指当前栏目表的字段信息。


底层模板字段:channellist标签支持栏目表的所有字段,如下


channelid, pid, name, total, modelid, path, type, forward, redirectto, defaultpage, title, keywords, description, picture, checked, navigation, visible, auth, comment, contribute, templateindex, templatelist, listurlrule, crosslisturlrule, templatedetail, detailurlrule, templatesingle, usedomain, sitedomain, sitepath, body, sort

支持栏目表的所有字段以外,系统提供了一些附加字段


original_channelid, topid, url, childids, child, subids, crossedids
channellist标签字段的说明请点击这里

例子:显示8条在导航栏显示的栏目列表。


1 {channellist type='nav' row=8}
2 {loop item=channelist}
3
  • {$channelist.name}

  • 4 {/loop}
    5 {/channellist}

    上例输出结果:


    excms560.jpg

    contentpagelist内容分页列表标签

    标签名称:contentpagelist

    功能说明:用于显示内容分页列表

    适用范围:列表模板

    基本语法:{contentpagelist channelid= titlelen= infolen= imgwidth= imgheight= orderby= includesubchannel= pagesize= pagetag=}{contentpagelistelse}{/contentpagelist}

    属性说明


    名称


    默认值


    是否必填


    描述




    channelid
    0

    表示栏目ID,在栏目模板和封面模板中不需要指定,多个栏目ID可用",",默认为0,也就是相当于顶级栏目。


    pagesize
    所有

    表示内容列表分页大小。


    titlelen
    全部

    表示标题显示的长度。


    infolen
    全部

    表示内容描述显示的长度。


    imgwidth


    表示缩略图宽度。


    imgheight


    表示缩略图高度。


    pagetag
    page

    分页页码变量,通过变量pagetag指定分页参数数据名称,动态浏览时使用。


    includesubchannel


    表示是否加载子栏目数据。


    orderby
    contentid

    表示排序方式,默认值是 contentid' 按内容ID排列。
    orderby='hot' 或 orderby='click' 或orderby='hits'表示按点击数排列
    orderby='pubdate'或'publishdate' 按发布时间排列
    orderby=
    contentid'按内容ID排序
    orderby='lastpost' 按评论最后回复时间排序
    orderby='postnum' 按内容评论次数排序
    orderby='rand' 随机获得指定条件的文档列表


    item


    通过item属性可访问contentpagelist标签自身的属性,如果当前标签指定了栏目,contentpagelist中的 item属性包含了当前栏目表的所有字段信息,否则为空,contentpagelist自身属性可以通过{$name.property}访问,其中"$name"是item指定的变量名称,property是指当前栏目表的字段信息。


    底层模板字段:contentpagelist标签支持内容数据表的所有字段,如下


    contentid, modelid, channelid, channelcross, title, shorttitle, metatitle, keywords, tags, description, source, author, isthumb, thumb, titleatt, likekeywords, likecontentid, forward, template, filename, ishtml, checked, userid, username, publishdate, modifieddate, createddate, distillate, recommend, credits, comment, sort, path

    支持内容数据表的所有字段以外,系统提供了一些附加字段


    url, encrypt_contentid, info, fulltitle, channel
    contentpagelist标签字段的说明请点击这里

    例子:分页显示栏目“101”下的所有内容列表,每页显示20条。


    01
    02 {contentpagelist channelid=101 pagesize=20}
    03
    04

      05
      06 {loop item=cnt}
      07 {if $_PAGE_CHANNEL.modelid==2}
      08

    • 09

      10

      {$cnt.title}


      11

    • 12 {else}
      13

    • 14

      15

      {$cnt.title}


      16 {$cnt.publishdate renderer=formatDate('Y-m-d h:i',@this)}

      17

      {$cnt.description} [阅读全文]


      18 {if $cnt.source}{/if}
      19

    • 20 {/if}
      21
      22 {/loop}
      23

    24
    25 {pager}
    {$pager.data}
    {/pager}
    26
    27 {contentpagelistelse}
    28
    当前没有内容

    29 {/contentpagelist}

    上例输出结果:


    excms561.jpg

    tagpagelist TAG分页列表标签

    标签名称:tagpagelist

    功能说明:显示TAG分页列表标签

    适用范围:列表模板

    基本语法:{tagpagelist channelid= titlelen= infolen= imgwidth= imgheight= orderby= includesubchannel= pagesize= pagetag=}{tagpagelistelse}{/tagpagelist }

    属性说明


    名称


    默认值


    是否必填


    描述




    channelid
    0

    表示栏目ID,在栏目模板和封面模板中不需要指定,多个栏目ID可用",",默认为0,也就是相当于顶级栏目。


    pagesize
    所有

    表示内容列表分页大小。


    titlelen
    全部

    表示标题显示的长度。


    infolen
    全部

    表示内容描述显示的长度。


    imgwidth


    表示缩略图宽度。


    imgheight


    表示缩略图高度。


    pagetag
    page

    分页页码变量,通过变量pagetag指定分页参数数据名称,动态浏览时使用。


    includesubchannel


    表示是否加载子栏目数据。


    orderby
    contentid

    表示排序方式,默认值是 contentid' 按内容ID排列。
    orderby='hot' 或 orderby='click' 或orderby='hits'表示按点击数排列
    orderby='pubdate'或'publishdate' 按发布时间排列
    orderby=
    contentid'按内容ID排序
    orderby='lastpost' 按评论最后回复时间排序
    orderby='postnum' 按内容评论次数排序
    orderby='rand' 随机获得指定条件的文档列表


    item


    通过item属性可访问tagpagelist标签自身的属性,tagpagelist中的item属性包含了当前tag表的所有字段信息,tagpagelist自身属性可以通过{$name.property}访问,其中"$name"是item指定的变量名称,property是指当前tag表的字段信息。

    tag的所有属性:tagid(标签ID),name(标签名),createddate(创建标签时间),click(总访问量),contentscount(标签中文章数量),weekcc(周访问量),monthcc(月访问 量),weekup,monthup

    底层模板字段:tagpagelist标签支持内容数据表的所有字段,如下


    contentid, modelid, channelid, channelcross, title, shorttitle, metatitle, keywords, tags, description, source, author, isthumb, thumb, titleatt, likekeywords, likecontentid, forward, template, filename, ishtml, checked, userid, username, publishdate, modifieddate, createddate, distillate, recommend, credits, comment, sort, path

    支持内容数据表的所有字段以外,系统提供了一些附加字段


    url, encrypt_contentid, info, fulltitle, channel

    tagpagelist标签支持TAG数据库表所有字段,如下


    字段名称


    说明




    tagid
    表示标签ID。


    name
    表示标签名称。


    createddate
    表示创建标签时间。


    click
    表示总访问量。


    contentscount
    表示当前标签包含文章数量。


    weekcc
    表示周访问量。


    monthcc
    表示月访问量。


    weekup
    表示本月踩数量。


    monthup
    表示更新时间。

    tagpagelist标签其它字段的说明请点击这里

    例子:分页当前TAG下的所有内容列表,每页显示40条。


    01 {tagpagelist pagesize=40}
    02
    03
    14
    15 {pager}
    {$pager.data}
    {/pager}
    16
    17 {/tagpagelist}

    上例输出结果:


    excms562.jpg

    category:EXCMS