This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored.
Release status: unmaintained
|Description||Extracts and removes the table of contents from the page|
|Author(s)||Marcin Cieślak, contracted by Viato GmbH (sapertalk)|
|Latest version||1.0.0 (2015-10-16)|
|Compatibility policy||Master maintains backward compatibility.|
|License||GNU General Public License 3.0 or later|
|Example||Naiad.skin.php line 69|
The DeToc extension extracts and removes the table of contents of a wiki article. In order to work the functions provided by this extension need to be used by the current skin. It is useful for skin programming to move the ToC into a different part of the page.
Add the following to your LocalSettings.php:
wfLoadExtension( 'DeToc' );
Then include the following line in your skin's
$new_body = DeToc::RemoveToc( $this->data[ 'bodycontent' ], $extracted_toc );
This way the
$new_body variable will contain the article body in HTML without table of contents. The
$extracted_toc variable will contain the table of contents without the initial
<div id="toc"> and the final
This extension is used in the updated Naiad skin to move the table of contents to another area of the screen.