Hilfe:SubPageList2
Diese Seite ist Teil des JappyWiki Handbuchs.
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.
Inhaltsverzeichnis |
Source
At the moment the source is only available from one mirror:
- Schaelles Webserver: schaelle.de:
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:
<subpages />
That code will generate a list of all subpages of the current page. To specify the list use the arguments in this syntax:
<subpages arg=value />or
<subpages arg="value" />or
<subpages arg='value' />
A good suggestion if you have many arguments is to use this syntax:
<subpages arg1=value arg2=another_value />
But if you need a title with a space you must wrap it using a single or double apostrophe.
Arguments
category
Category of the pages.
Default:
- -1
Can be:
- -1: All categorys
- text: Title of a category
Code example:
<subpages category="News" />
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:
<subpages count=10 />
debug
Error displaying on or off.
Default:
- 0
Can be:
- 0 or false: Show errors
- 1 or true: Didn't show errors
Code example:
<subpages debug=true />
or
<subpages debug=1 />
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, than Bar shouldn't be displayed.
Code example:
<subpages deepness=1 />
headline
Headline size of each title in a preview list.
Default:
- 2
Can be:
- numeric: Headline size
Example code:
<subpages headline=3 />
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:
<subpages ignore=Fubar />
or
<subpages ignore="Fu|bar|Another_Pagetitle" />
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:
<subpages order=DESC />
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:
<subpages ordermethod=lastedit />
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:
<subpages mode=preview />
namespace
Namespace of the pages.
Default:
- -1
Can be:
- -1: All namespaces
- text: Title of a category
Code example:
<subpages namespace=Help />
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:
<subpages parent=News />
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:
<subpages previewcount=100 />
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:
- Latest News
- News
- Yet Another News
- News again
- 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.