Extension:NiceCategoryList2

What can this extension do?
This extension displays a category listing, including sub-categories, in a number of useful formats. This is intended to allow easier navigation of a wiki's category tree. It implements a new tag,, which generates a list of all pages and sub-categories in a given category. The list can display multiple levels of sub-categories, and has several options for the display style.

This extension was created by Kichik as NiceCategoryList extension, and has been enhanced by JohanTheGhost.

Usage
The  tag displays a category list:

Category:Some Category

The tag takes the following parameters, all of which are optional:
 * maxdepth= : The maximum category depth to display; default 32
 * style= : 'bullet' to show category contents as bullet lists (default); 'compact' for a more compact listing
 * showcats= : Non-0 to display sub-category links in "bottom" (ie. maxdepth) categories (default 0).
 * showarts= : Non-0 to display articles in categories (default 1).
 * headings= : 'head' to display category headings as Wiki headings (default); 'bullet' to display category headings as large bullets ('headings=bullet' works well with 'style=compact').
 * headstart= : With 'headings=head', the heading level to list top-level categories with (level increases for sub-cats) (default 1).

Examples
For a full, recursive listing of all categories under a specified category (not recommended for large wikis), use this: Category:Some Category

For a nice "high-level" category index, use this in a template: Category: and include it in major category pages to provide a nice 2-level (or however many you like) index of the category.

This: Category:Categories generates a full category listing, with indentation indicating category containment.

Caveat: When used in a template, the category list will not refresh immediately when reloaded; edit and save the article to see updates.

Installation

 * 1) Download the extension code:
 * 2) * Version 1.0: known to work with PHP 4 and MW 1.6.
 * 3) * Version 2.0: known to work with PHP 5 and MW 1.9; will not work on PHP 4 / MW 1.6. This version has much better encapsulation and is better structured.
 * 4) Save the code in your wiki's   directory as.

Changes to LocalSettings.php
require_once("$IP/extensions/NiceCategoryList.php");