Extension:Subpage Fun

What can this extension do?
This extension provides your wiki with several new parser functions/variables to get informations about subpages you can't get with MediaWikis existing magic Words.

Usage
Subpage Fun defines,  ,  ,   and. You can use them either like that as variables for the current page or you can use them with a parameter like  to use them for any page you want.


 * SUBPAGES: Outputs all subpages as a comma separated list. This means all descendant pages, not only direct child pages.
 * PARENTPAGES: Outputs all ancestor pages as a comma separated list.
 * SIBLINGPAGES: Outputs all sibling pages of the same subpage level and tree as a comma separated list.
 * SUBPAGELEVEL: The subpage level of a page. A normal page which is no subpage at all would return 0.
 * NUMBEROFSUBPAGES:	How many subpages does a page have. Also works with subpages to see how many subpages they have. Counts all descendant pages, not only direct child pages.
 * TOPLEVELPAGE: The top level page which is the page with subpage level 0 within the same subpage tree.

Advanced list formations
,,   have a list output. You can use this output for further use with Extension:ArrayExtension for example.

There are two more parameters for each of those functions beside 1 which allows to define the page to get the information from. If parameter 2 has any value at all the pages in the list become links. Parameter 3 allows to define another list separator than the default separator.

Example:

Download instructions
You can take the code from /Source code. Create a new directory SubpageFun in your MediaWiki's extension directory and put the code in a new file LocalSettings.php there.

Installation
To install this extension, add the following to LocalSettings.php:

Change Log
the latest Subpage Fun extension has been tested on MediaWiki version 1.15

History

 * Dec 9, 2009 -- Version 0.1.0: First release of Subpage Fun. Comes with the six variables/functions,  ,  ,   and.