Extension:HasCategory

HasCategory enhances MediaWiki parser with new function which determines whether a page has a ceratain category and based on result returns specified value.

Usage
Syntax for the   parser function:

The third (then) and fourth (else) parameters are optional, their defaults are 1, respectively 0.

Download instructions
Copy and paste the code from this page and place it in $IP/extensions/HasCategory/HasCategory.php, HasCategory.i18n, respectively. 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 code to your LocalSettings.php: