-
Notifications
You must be signed in to change notification settings - Fork 0
Github mirror of MediaWiki extension SubpageFun - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)
License
wikimedia/mediawiki-extensions-SubpageFun
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
== About ==
'Subpage Fun' provides your wiki with seven new parser functions/variables to get information about subpages [0]
you can't get with MediaWikis existing magic Words. Also, this extension has a slightly different concept about
what is considered a subpage than MediaWikis existing functions.
MediaWikis existing subpage functions just define a subpage as the part behind a slash ('/'). This extension goes
one step further and says that a page is only then a subpage when a parent page exists. This means a page 'AC/DC'
won't be a subpage as long as the page 'AC' doesn't exist. Assuming the page 'AC/DC/Discography' exists, the page
'AC/DC/Discography/1975/1976' would have the '{{SUBPAGETITLE}}' '1975/1976'. The MediaWiki '{{SUBPAGENAME}}'
variable instead would only output '1976' in this case which is nonsense since this page doesn't even exist.
The following can be used as MediaWiki variables '{{SUBPAGES}}' for the current page, or as parser functions for a
specific page ''{{SUBPAGES:page}}'', some even with additional parameters.
SUBPAGETITLE:
The real name of a subpage, not only the part behind the last slash ('/') like MediaWiki's SUBPAGENAME outputs it.
SUBPAGES:
Outputs all Subpages as a comma separated list. This means all descendant pages, not only direct child pages. The
output has no specific order.
PARENTPAGES:
Outputs all ancestor pages as a comma separated list. The output begins with the top level page and ends with the
direct parent page.
SIBLINGPAGES:
Outputs all sibling pages of the same subpage level and tree as a comma separated list (without specific order).
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.
As a new feature in 'Subpage Fun' 0.5.2, all these variables also support the 'THIS:' prefix functionality of the
'Parser Fun' extension if it is installed within the wiki.
See [https://www.mediawiki.org/wiki/Extension:Parser_Fun] for details.
== Installation ==
Once you have downloaded the code, place the 'SubpageFun' directory within your MediaWiki 'extensions'
directory. Then add the following code to your [[Manual:LocalSettings.php|LocalSettings.php]] file:
# Subpage Fun
wfLoadExtension( 'SubpageFun' );
== Contributing ==
If you have bug reports or requests, please add them to the 'Subpage Fun' Talk page [1].
You can also send them to Daniel Werner < danweetz@web.de >
[0] https://www.mediawiki.org/wiki/Help:Subpages
[1] https://www.mediawiki.org/w/index.php?title=Extension_talk:SemanticUpdateOnPurge
About
Github mirror of MediaWiki extension SubpageFun - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)
Resources
License
Code of conduct
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published