Forum:Get the category name of a page?

I am trying to make a modified infobox that will display different aprameters depending on where you put it... But I can't for the life of me find any way to get the Category. I have a hard time beleiving that it's not possible (I can get the number of the week of the user's local time, or the name of the help namespace, but not the category name? Seriously?) but it certainly does seem that way. Does anybody here know of a way to do this? D3matt 00:28, April 23, 2011 (UTC)


 * You can with JS, but I don't know if there's a magic word for the categories of the page you're on, partly because a page can have multiple categories - you'd probably have trouble parsing it anyway.


 * Can't you use the with additional text and parser/string functions to do that? The description you provided is not very clear. -- 01:10, April 23, 2011 (UTC)
 * He's looking for the categories that the page is a part of, which isn't included in the name of the page. Could be done with a switch statement, but it would be horribly inefficient.