参数说明
- id: 循环变量名(默认crawler)
- empty: 无数据时的提示
- key: 计数变量(默认i)
- mod: 求模值(默认2)
- row: 返回数据条数(默认10)
- orderby: 排序方式(默认id DESC)
- cache: 是否缓存结果(true/false)
- condition: 额外的查询条件
示例
``html
{cms:crawlercontents id="crawler"}
{$crawler.title}
平台: {$crawler.platform}
发布时间: {$crawler.createtime|date="Y-m-d H:i:s",###}
点赞数: {$crawler.likecount}
{/cms:crawlercontents}
{cms:crawlercontents id="crawler" orderby="createtime DESC" row="5"}
{$crawler.title} - {$crawler.createtime|date="Y-m-d H:i:s",###}
{/cms:crawlercontents}
{cms:crawlercontents id="crawler"}
{/cms:crawlercontents}
``
可用字段
- title: 内容标题
- desc: 内容描述
- content: 内容正文
- platform: 发布平台
- createtime: 发布时间(时间戳)
- likecount: 点赞数
- commentcount: 评论数
- coverurl: 封面图片URL
- contenturl: 原文链接
- sourcekeyword: 来源关键词
- user_nickname: 作者昵称