Board Thread:Support Requests - Getting Technical/@comment-31301469-20170409142825

I'm trying to make a template wich, given a page (mostly be images but don't think it matters in general) looks wether it belongs to a certain category (rarities of items in the game) and then gives the desired color back. I'm pretty sure a switch will work with the multiple if problem, but as the title states, is there a way to test wether a page belongs to a category and if this is not possible could you suggest any other way this may be accomplished? 