参数说明
参数名 | 参数类型 | 默认值 | 是否必需 | 说明 |
categoryIds | 数字 | 根据当前访问路径,查出栏目ID,以当前栏目ID为准 | × | 栏目类别ID, 多个用,号分格 |
categoryPaths | 字符串 | 根据当前访问路径,查出栏目ID,以当前栏目ID为准 | × | 栏目访问路径, 多个用,号分格 |
titleLength | 数字 | 无 | × | 标题长度 |
append | 字符串 | … | × | 标题省略符号 |
isPage | 布尔 | FALSE | × | true表示开启分页 |
page | 数字 | 1 | × | 当前页(isPage为true时有效) |
pageSize | 数字 | 10 | × | 每页显示多少条(isPage为true时有效) |
count | 数字 | 10 | × | 显示前多少条(isPage非true时有效) |
dateformat | 字符串 | “” | × | 日期格式化 |
sort | 字符串 | input_date | × | 排序字段 |
sortOrder | 字符串 | desc | × | 升序/降序 |
listName | 字符串 | list | × | 结果集名称 |
结果集说明
l表示当前行数据,其包含的数据有
参数名 | 说明 |
id | 文章ID |
title | 文章标题 |
shortTitle | 截取后的文章标题 |
input_date | 发布日期 |
desciption | 描述 |
thumb | 缩略图 |
href | 文章URL |
代码1
<@newsList categoryIds="5502" count="6"> <#list list as l> ${l.title}
代码2
<@newsList categoryPaths="etopic" count="6" > <#list list as l> ${l.title}
代码3
<@newsList categoryIds="5502" count="3" titleLength="10" sort="id" sortOrder="desc" listName="ls" append=".."> <#list ls as l>${l.shortTitle}