User:VeganCritter/Template:Infobox Character/Categorization

This page contains working code that will selectively replace key words defined in an array with categories defined in a second array. The intended use is in Infobox Character, so that the race, class, creature type, and even places or factions could be automatically converted to categories (or "see related" icons or text, such as [+] or [cat]).

Defining Arrays
Edit page source to see the array definitions.

Code
Edit page source to see the code.