Board Thread:Support Requests - Getting Technical/@comment-4572079-20140321175520/@comment-2093602-20140321202415

You can use this JavaScript function: function pageInCategory(cat) { var cleaned = cat.charAt(0).toUpperCase + cat.slice(1).replace(/_/g,' '); return mw.config.get('wgCategories').indexOf(cleaned) != -1; }

Usage: if(pageInCategory('Some Category')) { ... }

If you meant through wikicode, you can ask staff if they can enable the PageInCat extension. (I don't know if they will though)