gibbs / phile-last-modified
该包已被弃用且不再维护。未建议替代包。
一个简单的philecms插件,返回页面(文件)的Unix时间戳
1.0.2
2014-07-07 19:59 UTC
Requires
This package is not auto-updated.
Last update: 2020-02-21 15:50:20 UTC
README
一个简单的PhileCMS插件,返回页面(文件)的Unix时间戳。这可以与您的模板引擎结合使用,以格式化页面的最后修改日期。适用于博客文章和维基条目。例如
Last Updated on Mon 19th May 2014 at 7:49pm
这可以通过在Twig中使用date函数来输出。例如
<h1>{{ meta.title }}</h1> <p><small>Last Updated {{ modified|date("D jS M Y \\a\\t g:ia") }}</small></p> {{ content }}
1. 安装
通过composer安装
composer require "gibbs/phile-last-modified:1.*"
通过git安装
从phile
目录克隆此存储库到plugins/gibbs/phileLastModified
。例如
git clone git@github.com:Gibbs/phileLastModified.git plugins/gibbs/phileLastModified
手动安装
下载并解压缩内容到:plugins/gibbs/phileLastModified
2. 插件激活
在您的config.php
文件中激活插件
$config['plugins']['gibbs\\phileLastModified'] = array('active' => true);