Extension:SubPageList2

Sub Page List 2 is an extension that automaticaly creates a list of the subpages of a page. The dynamic created list will be created automatically on every edit of the page where the SubPageList element is given.

Source
At the moment the source is only available from one mirror:


 * Schaelles Webserver: schaelle.de:
 * http://stuff.schaelle.de/SubPageList2/SubPageList2.zip


 * Note: In order to best display this extension when we go to Special:Version in our wikis, in the code downloaded from above, make the following line:


 * look like this (2 additional lines with description and url link):


 * And, while we're at it, why not put ALL downloadable source files and text/readme/install and so on in a sub page right here underneath the extension, say, at Extension:SubPageList2/Source or Extension:SubPageList2/Download? Why not do this for anything downloadable at MediaWiki?


 * Thanks. -- Peter Blaise peterblaise 16:35, 11 July 2007 (UTC)

Installation

 * After download the source uncompress the Zip file.
 * Upload SubPageList2.php to your wiki/extension directory.
 * Add the following lines to your LocalSettings.php:

A good position is at the end of the file, but before the closing delimiter.

History
Subpage List 2 is a very extend hack of the orginial SubpageList by Rob Church in autumn 2006.

Authors

 * Martin "Schaelle" Schallnahs, main developer. - Website

MediaWiki Version

 * Successfully tested on MediaWiki 1.7.1
 * Untested on MediaWiki 1.7.0 or less

Usage
To generate an automatic Subpage using Subpage List 2 add the following code to a page:

That code will generate a list of all subpages of the current page. To specify the list use the arguments in this syntax:

or or 

A good suggestion if you have many arguments is to use this syntax: 

But if you need a title with a space you must wrap it using a single or double apostrophe.

category
Category of the pages.

Default:
 * -1

Can be:
 * -1: All categorys
 * text: Title of a category

Code example: 

At the moment this argument only can have one value!

count
Count of articles that shall be displayed. Must be numeric!

Default:
 * -1

Can be:
 * -1: All pages
 * numeric: Number of pages that are displayed

Code example: 

debug
Error displaying on or off.

Default:
 * 0

Can be:
 * 0 or false: Show errors
 * 1 or true: Didn't show errors

Code example:  or 

deepness
How deep the Subpage List 2 extension get the subpages.

Default:
 * -1

Can be:
 * -1: All pages
 * numeric: Deepness level

Example:

You have Mainpage/Fu/Bar but deepness is 1, then Bar wont be displayed.

Code example: 

headline
Headline size of each title in a preview list.

Default:
 * 2

Can be:
 * numeric: Headline size

Example code: 

ignore
What pages shall be ignore making a Subpage List using Subpage List 2.

Default:
 * -1

Can be:
 * -1: No pages are ignored
 * text: Title of pages seperated by a vertical line (|)

Example code:  or 

order
Type of ordering the Subpage List.

Default:
 * ASC

Can be:
 * ASC: ascending - from up to down
 * DESC: descending - from down to up

Example code: 

ordermethod
Using what the list shall be ordered.

Default:
 * title

Can be:
 * title: Alphabetic order by the page title
 * lastedit: Timestamp numeric order of the last edit of the page

Example code: 

mode
Output style of the list.

Default:
 * ordered

Can be:
 * unordered: UL list as output
 * ordered: OL list as output
 * preview: Listing of the pages with headline and a preview in a specific output format - See previewcount and previewmode

Example Code: 

namespace
Namespace of the pages.

Default:
 * -1

Can be:
 * -1: All namespaces
 * text: Title of a category

Code example: 

At the moment this argument only can have one value!

parent
Parent of the listed pages.

E.g. if you are in Mainpage it will list all subpages of Mainpage. If you are in Mainpage but you use News the list generate a Subpage List of alle subpages of News.

Default:
 * -1

Can be:
 * -1: The current page title
 * text: Title of the specific page

Code example: 

At the moment this argument only can have one value!

previewcount
How much letters are shown in a preview list.

Default:
 * -1

Can be:
 * -1: The whole content of the page
 * numeric: Numeric letters of a page following by three dots
 * firstsection: The first section/part of a page (in the most times the introduction)

Code example:  or <subpages previewcount=firstsection />

previewmode
Style of the preview list.

Default:
 * normal

Can be:
 * normal: Normal layout
 * pre: A tab before every line (using colons)
 * tt: In the teletyper layout
 * code: Wrapped by a code unit

Code example: <subpages previewmode=pre />

showpath
Style of the title of page that is displayed in the list.

Default:
 * normal

Can be:
 * normal: Normal, e.g. Mainpage/Entry/Sub
 * notparent: The path without the $parent item, e.g. Entry/Sub
 * no: No path, only the page title, e.g. Sub

Examples
Now follow some examples:

Latest $x Whatever
<subpages parent=News order=DESC order=lastedit ignore=2006 mode=ordered showpath=no count=5 />

Generates the following output:


 * 1) Latest News
 * 2) News
 * 3) Yet Another News
 * 4) News again
 * 5) 5th News

Latest $x Whatever with preview
<subpages parent=News/2006 order=DESC order=lastedit ignore=2006 mode=preview previewcount=firstsection previewmode=pre showpath=no headline=4 count=1 />

Generates:

Latest News

 * Thats the first section of the latest news.
 * Can be multi lined.

Wikis using Sub Page List 2
If you use this extension, please add your website here.


 * schaelle.de, Website of Schaelle - in German
 * ZUM-Wiki (wiki.zum.de), Wiki of ZUM.de - in German
 * KnowledgeWithoutLimits, Wiki of - in English
 * REWILD.info Field Guide - in English