文章数据在所有页面都可以使用,如搜索页,分类页,存档页,用户页等
文章列表数据的数组变量是 $logs
一般用 来循环输出
可以输出的内容是可以通过修改对应的 controller 实现的,默认输出以下内容:
gid => 文章id
title => 文章标题
date => 时间戳
content => 文章内容
excerpt => 摘要
alias => 链接别名
author => 作者
sortid => -1
type => 类型 blog page
views => 浏览数
comnum => 回复数
attnum => 附件数
top => 全局置顶
sortop => 分类置顶
hide => 草稿
checked => 审核
allow_remark => 允许评论
password => 访问密码
template => 模板
tags => 标签列表
log_title => 标题
log_url => 地址
logid => id
log_description => 摘要
attachment => 附件
tag =>
tbcount =>
文章内容页,文章内容页可以使用以下变量值:
$log_title 文章标题
$timestamp 文章发表日期时间戳 服务器 > 1461108087
$date 文章发表日期时间戳 本地 > 1461108087
$logid 文章id
$sortid 分类id
$type 文章类型
$author 文章作者
$log_content 文章内容
$views 文章浏览数数
$comnum 文章评论数
$top 是否全局置顶
$sortop 是否分类置顶
$attnum 文章附件数
$allow_remark 评论是否打开
$password 文章密码
$template 文章使用模版
$logs用户发表的文章
$logs['date'] 文章发表时间戳
$logs['log_title'] 文章标题
$logs['log_url'] 文章链接
$logs['logid'] 文章id
$logs['log_description'] 文章摘要
$logs['attachment'] 附件
$logs['tag'] 标签
$logs['tbcount'] 0