PyLucid CMS Logo

Table of contens plugin

↑ about  #

With the TOC plugin you can build a "table of content" link list.
The Plugin grabs all headlines from the content and add a anchor to them.

Note: TOC used a simple RegularExpression for getting all headline. It doesn't match on headlines if the tag has any attribute (e.g. class="foo"). So you can easy "exclude" headlines by adding a attribute ;)

↑ usage  #

The Table of contents plugin can be inserted into PageContent or into global template.

TOC is displayed only if there exists at least the specified number of headlines. (lucidTag parameter 'min')

You should add something like this, at the top of your global template:

HTML
1
<a name="top"></a>

↑ example  #

HTML+Django/Jinja
1
{% lucidTag TOC %}

specified number of headings with the min parameter:

HTML+Django/Jinja
1
{% lucidTag TOC min=4 %}

↑ change the look  #

The TOC plugin used two templates:

You can overwrite these template, use: PyLucid admin menu / tools / overwrite templates

↑ TODO  #

The RSS Feed plugin can generate many headlines, from the feed. There headlines would be inserted into the TOC, too :(
Work-a-round: Overwrite the RSS Tremplate and add a class to all headlines.

0 Kommentare für 'TOC':
    Es existiert kein Kommentar für 'TOC'
Kommentar hinterlassen
tag navi plugin | pylucid | TOC

django-processinfo: 6.4 ms of 365.0 ms (1.8%)