Board Thread:Support Requests - Getting Technical/@comment-33878615-20160620040544/@comment-25508186-20160620110934

Other than what Dessamator suggested, you could do an #ifeq check on the second parameter to determine if it's value is equal to "the":

Here's a little breakdown of the above parser functions:
 * This checks whether the second parameter is equal to "the". If yes, it returns "the" and an #if check otherwise. This nested #if returns "the" if the third parameter is not empty, nothing otherwise.
 * Like above, this checks whether  is equal to "the". If yes, it returns the first parameter (allowing   to work). If it's not, it returns   which links to   (or   if it doesn't exist, allowing   to work) and puts   as the text displayed.
 * Like above, this checks whether  is equal to "the". If yes, it returns the first parameter (allowing   to work). If it's not, it returns   which links to   (or   if it doesn't exist, allowing   to work) and puts   as the text displayed.
 * Like above, this checks whether  is equal to "the". If yes, it returns the first parameter (allowing   to work). If it's not, it returns   which links to   (or   if it doesn't exist, allowing   to work) and puts   as the text displayed.

For more info on #ifeq and other parser functions in general, see mw:Help:Extension:ParserFunctions.