entidi/silverstripe-autotoc

Dynamically generate the table of contents from $Content

Installs: 103

Dependents: 0

Suggesters: 2

Stars: 3

Watchers: 1

Forks: 4

Open Issues: 0

Type: silverstripe-module

1.1.2 2016-05-26 19:39 UTC

README

License Build Status Code Quality Latest Stable Version

Automatically generate the table of contents from the Content of a page or, more generally, from any HTML field.

Installation

If you use composer, you could just run the following command:

composer require entidi/silverstripe-autotoc

To manually install it you should unpack or copy silverstripe-autotoc into your SilverStripe root directory, rename it to autotoc and do a ?flush.

This module can be used without the CMS.

Testing

Part of this project (the Tocifier class) is intentionally decoupled from SilverStripe so it can be tested without pulling in all the framework.

From the module root directory you can trigger the testing by calling phpunit (that must be previously installed on your system):

phpunit --bootstrap tests/Bootstrap.php tests/

Other documentation