gibbs / phile-table-of-contents
此包已被废弃,不再维护。没有建议的替代包。
为Phile CMS生成目录
0.0.9
2014-09-06 22:40 UTC
Requires
This package is not auto-updated.
Last update: 2020-01-20 10:04:28 UTC
README
这是一个基于页面标题自动生成目录的PhileCMS插件。
此插件旨在内部使用。
1. 安装
通过git安装
从phile
目录克隆此仓库到plugins/gibbs/phileTableOfContents
。例如:
git clone git@github.com:Gibbs/phileTableOfContents.git plugins/gibbs/phileTableOfContents
手动安装
下载并解压到:plugins/gibbs/phileTableOfContents
2. 插件激活
在您的config.php
文件中激活插件
$config['plugins']['gibbs\\philephileTableOfContents'] = array('active' => true);
3. 示例用法
<ol id="tableofcontents"> {% for entry in tableofcontents %} <li><a href="{{ current_page.url }}{{ entry.hash }}">{{ entry.title }}</a></li> {% endfor %} </ol>