Template:HadezUtilRealmLink/doc

From BattleMaster Wiki
Jump to navigation Jump to search

Summary

{{HadezUtilRealmLink|REALM_NAME}}

A utility template - when passed a realm name it returns a link to the realm page even when a region of that name also exists.

If wiki page 'REALM_NAME (Realm)' exists it links to that page with REALM_NAME as the link text.
If only the wiki page 'REALM_NAME' exists it links to that page.
If neither exist it shows REALM_NAME in plain text.

The template can be called using named or numeric parameters.

The template returns the link or text with no surrounding spaces.

nb. This template would usually be invoked from within another template or dynamically generated list.

Author: Wraith0x29a

Parameters

realm or param #1 : The name of the realm as it appears in the game.

Usage

Using Named Parameters

{{HadezUtilRealmLink
| realm=REALM_NAME
}}

Using Numeric Parameters

{{HadezUtilRealmLink|REALM_NAME}}


Adapting Existing Templates

For use in existing templates, simply change..

[[ {{#external_value:realm}} ]]

..to..

{{HadezUtilRealmLink|realm={{#external_value:realm}}}}

..assuming you had the realm name assigned to the external_value called 'realm'.