Extension:CategoryTests

Usage
This currently defines 3 parser functions for category testing.


 * -- tests if the given page is in the category given, then displays "then" or "else" (or current page if no page is given).
 * -- tests if the given page does not belong in any categories, then displays "then" or "else" (or current page if no page is given).
 * -- Operates like the ParserFunction #switch, but doesn't take an initial parameter (it just starts cycling through right away) and tests if the page is in those categories instead of comparing it to a value. You can specify to test other pages using #page=pagename, where it would then test that page instead of the current page until the next #page definition, in which case it will test that page now instead. Making #page empty resets it to the current page.

Download instructions
Please cut and paste the code found below and place it in. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

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