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

数字化百科 / 词条 / EXCMS标签 clicklist点击数内容列表

EXCMS标签 clicklist点击数内容列表

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

导航:返回上一页


EXCMS模板标签介绍,“clicklist点击数内容列表”:

标签名称:clicklist

功能说明:获取按点击数排列的内容列表

适用范围:全局模板

基本语法:{clicklist row= titlelen= infolen= order= modelid= channelid= includesub= subday=}{clicklistelse}{/clicklist}

属性说明


名称


默认值


是否必填


描述




row
所有

表示显示内容点击记录数。


titlelen
所有

表示内容标题显示长度。


infolen
所有

表示内容简介长度


order
all

表示排序方式 ,all:所有点击量,day:今天点击量,week:本周点击量,month:本月点击量,year:今年点击量。


modelid
全部

表示模型id。


channelid
0

表示栏目id,多个栏目ID用逗号隔开。


includesub
false

表示是否包含子栏目。


subday
全部

表示多少天以内的内容点击量。


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


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
clicklist标签字段的说明请点击这里

例子:显示最近、本周、本月15条点击量最高的。


01
02

03

04

排行


05
  • 最近
  • 本周< /li>
  • 本月

06

07

08

09
10
11 {clicklist row=15}
12 {loop item=cnt}
13

{$cnt._loop_rownum}
{$cnt.title}

14 {if $cnt._loop_rownum==1 and $cnt.description}
{$cnt.description} class="more">[阅读全文]
{/if}
15 {/loop}
16 {/clicklist}
17
18
19

20
32
44

45

上例输出结果:


excms557.jpg

category:EXCMS