Community Central
Community Central

Highlight Links in Category is an extension that adds a CSS class to links pointing to members of a category.


If you want to use this extension on your wiki, you will need your Wiki Manager to configure it, even if you're an admin. Give your WM a list of categories and the classes they should add. Configuration is done via $wgHighlightLinksInCategory (see the page for full usage documentation).

Use cases[]

The most general use case for this extension is to highlight disambiguations, any wiki can make use of this. Links could also be given flairs via a ::before selector, for example to flair all PC content with a PC icon and all console content with a console icon. An advanced use case could be to use this as an alternative to TippingOver and add a clickable ::after to links that lazily loads content via JavaScript.


If you want to show (for example) a hero's portrait next to their name, this extension will not work because the same class must be displayed across all links in a category. This extension also doesn't load classes in the Category namespace. If you define a large number of category classes and have very high-content pages, you may run into the template include size limit more quickly than otherwise, though using short class names can abate this issue.

External links[]