If you want to do this the "right way"
I certainly do!
then your best bet is to overload some method
I thought that's what I (or my friend) had done... !? Would you mind taking a quick look: http://www.mediawiki.org/wiki/Manual:Skinning/Example
http://jimbojw.com/wiki/index.php?title=How_to_display_MediaWiki_Categories_...
I guess I should be glad I didn't know about this before - otherwise I would certainly have gone for the easy but dirty way...
-- F.