Template:Convertname/doc

This template looks up card file names or aliases in the NP_Aliases table and returns the corresponding file name, display name and alias if an alias exists for that card.

When called using either  or , it will produce the following three variables if a match is found:
 * holds the card’s display name.
 * holds the card’s file name.
 * holds the card’s alias.

Note that in cases where this template is called multiple times on the same page, you should blank the variables’ values between iterations. Consider the following example, where the template is used to call using the card’s alias if there is one, or its display name otherwise:

At present, it is not possible to check whether an alias exists based on a DisplayName using this template. This is because Convertname’s purpose is indeed to convert a name into a different form, and it would not know which entry to return among any duplicates found using DisplayName as a parameter. Instead, one can simply write a Cargo query to fetch the desired DisplayName in the NP_Aliases table and handle empty results as desired, and/or collect all results to use them as intended.