自定义新闻标签

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

参数说明

参数名 参数类型 默认值 是否必需 说明
type 字符串 hot 取值为hot,表示显示热点新闻; 取值为relative,表示当前新闻的相关新闻
titleLength 数字 × 标题长度
append 字符串 × 标题省略符号
dateformat 字符串 “” × 日期格式化
listName 字符串 list × 结果集名称
isPage 布尔 FALSE × true表示开启分页
page 数字 1 × 当前页(isPage为true时有效)
pageSize 数字 10 × 每页显示多少条(isPage为true时有效)
count 数字 10 × 显示前多少条(isPage非true时有效)

结果集说明

l表示当前行数据,其包含的数据有

参数名 说明
id 文章ID
title 文章标题
shortTitle 截取后的文章标题
input_date 发布日期
desciption 描述
thumb 缩略图
href 文章URL

代码1


<@customNews type="hot" count="5"  titleLength="40"  listName="ls" >
          <#list ls as l>
                 
  •                      ${l.shortTitle}                  
  •           


    转载于:https://my.oschina.net/wancaibida/blog/311375

    你可能感兴趣的:(自定义新闻标签)