gibbs/phile-table-of-contents

This package is abandoned and no longer maintained. No replacement package was suggested.

Generates a table of contents for the Phile CMS

0.0.9 2014-09-06 22:40 UTC

This package is not auto-updated.

Last update: 2020-01-20 10:04:28 UTC


README

A PhileCMS plugin that automatically generates a table of contents based on a pages headers.

This is intended for internal use.

1. Installation

Install via git

Clone this repository from the phile directory into plugins/gibbs/phileTableOfContents. E.g:

git clone git@github.com:Gibbs/phileTableOfContents.git plugins/gibbs/phileTableOfContents

Manual Install

Download and extract the contents into: plugins/gibbs/phileTableOfContents

2. Plugin Activation

Activate the plugin in your config.php file:

$config['plugins']['gibbs\\philephileTableOfContents'] = array('active' => true);

3. Example Usage

<ol id="tableofcontents">
	{% for entry in tableofcontents %}
		<li><a href="{{ current_page.url }}{{ entry.hash }}">{{ entry.title }}</a></li>
	{% endfor %}
</ol>