Imprimer
Article Table of Contents v1.0
Written by Thomas Equeter   
Monday, 19 January 2009 13:45
Article Index
1. Description
1.1. Installation
1.2. Enabling the Plugin
1.3. Usage
1.4. Configuration
2. Bugs and Limitations
2.1. Simplistic HTML Parser
2.2. Incompatibility With Other ToC Plugins
2.3. Always On
3. Contact
4. Version

This Joomla! 1.5.x plugin displays a table of contents for articles that are structured using headings.

Warning: This article documents a previous version of Joomla! Article ToC.

1. Description

1.1. Installation

Install this extension like any other in the Extensions > Install / Uninstall screen (see illustrations below). Joomla! extensions can be uploaded as a package or installed directly from a remote location (which is the easiest).

Installing a Joomla! extension

1.2. Enabling the Plugin

Joomla! does not enable the freshly installed extensions by default. In Extensions > Plugin Manager, just click on the disabled red icon in the plugin list to fix that.

Enabling the Article ToC plugin

1.3. Usage

The Format menu in the default TinyMCE editorAt this point the plugin is functional and you can see its effects on articles that have headings. Headings mean that instead of manually formatting titles and subtitles in your documents (bold, larger font), you declare them as such and let the site theme style them. This is smarter for several reasons:

  • You focus on the structure of your documents, not how they look
  • You can change the look 'n feel of your site in a single place rather than going through every article
  • Automated tools such as this plugin or Google understand the structure of your documents and can act on it properly

How to add headings to your documents? In the default TinyMCE editor, this is done using the --Format-- menu and one of the Heading X entries. If you are not using TinyMCE, use whatever produces h1, h2, ... tags in the underlying HTML.

The results are shown only on the user site, not in the preview window. By default, the following happens (these effects can be customized in the plugin configuration page):

  • Headings are numbered by level, starting at 1.
  • The Table of Contents is shown in the top-right corner of the article area with the caption Article index. It is built from the article structure with links to the corresponding headings.

1.4. Configuration

If you follow the steps outlined in Enabling the plugin but click on the plugin name rather than on the enable/disable icon, you will reach the plugin configuration page. There, the Plugin Parameters box on the right allows the enable or disable part of the plugin features. By default, all are enabled.

The plugin parameters box

2. Bugs and Limitations

2.1. Simplistic HTML Parser

This plugin is inspired from examples found in the Joomla! source code and its parser is very simplistic. In particular, it accepts no other tag inside the headings. This means that headings with bold, italic or other markup will be ignored by Article Table of Contents or cause incorrect results.

This is probably the #1 cause of trouble with this plugin. Have a look at the HTML source of your article if you notice strange behavior, most of the time it will be a stray br tag in a heading.

Some examples that work:

  • <h3>My Heading</h3> is OK
  • <h3 class="foo">My Heading With Style</h3> is OK

Some examples that don't work:

  • <h3><strong>Won't Work</strong></h3> is NOT OK
  • <h3>Won't Work Either<br /></h3> is NOT OK

2.2. Incompatibility With Other ToC Plugins

The article index box is a single Joomla! feature used by any number of plugins. In other words, other plugins like Content - Page Navigation will not play nice with this one if more than one triggers for a given article.

Both can be enabled however, as long as they don't do anything - for Page Navigation this means not finding a Pagebreak tag (hr), for Article ToC this means no heading, etc.

2.3. Always On

It is not possible to enable or disable this plugin on a per-article basis. This will be addressed in a future release.

3. Contact

I am reachable at This e-mail address is being protected from spambots. You need JavaScript enabled to view it .

4. Version

This article documents Article Table of Contents version 1.0.

Last Updated on Wednesday, 28 October 2009 13:02
 

À propos de Straton IT

Straton IT vous apporte l'expertise nécessaire au bon fonctionnement de votre infrastructure informatique.

N'hésitez pas à nous contacter : This e-mail address is being protected from spambots. You need JavaScript enabled to view it / 03 20 29 89 72