Extension:PageInCat

What can this extension do?
This extension adds a parser function that is similar to the function from extension:ParserFunctions. It works as follows. Doing things like that is probably not a good idea and may give undefined behaviour (Alternating in category Foo and not in a category Foo with each page save)

Installation
Download thingy, put it in appropriate place in extensions directory, add line  to bottom of LocalSettings.php

Note, this will probably work for MediaWiki versions before 1.19 (provided its not super ancient), eventhough the download link only has a version for MediaWiki 1.19. If in doubt, try it out and see if it works with your version.

Configuration parameters
This extension doesn't have any configuration parameters. However, the number of times you can use #incat on a page is limited by $wgExpensiveParserFunctionLimit (defaults to 100, which should be fine for most folks). Calling #incat twice on the same page for the same category only counts once towards the expensive function limit.