Difference between revisions of "Template:HadezUtilRealmLink/doc"

From BattleMaster Wiki
Jump to navigation Jump to search
(new documentation)
 
m (Clarified what it does.)
Line 1: Line 1:
 
===Summary===
 
===Summary===
  
A utility template - when passed a realm name it generates a link to the realm page even if a region or duchy page with that name exists.
+
A utility template - when passed a realm name it tries to find the best valid link to the realm's wiki page.
  
ie. if the realm 'Oritolon' is passed as a parameter the template returns a link to 'Oritolon (Realm)' if that page exists.
+
If wiki page 'REALM_NAME (Realm)' exists it links to that page.
 +
If not but 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 can be called using named or numeric parameters.
 
If there is a problem and the realm name does not exist in the wiki the name is displayed in plain text.
 
  
 
nb. This template would usually be invoked from within another template or dynamically generated list.
 
nb. This template would usually be invoked from within another template or dynamically generated list.

Revision as of 00:28, 31 January 2011

Summary

A utility template - when passed a realm name it tries to find the best valid link to the realm's wiki page.

If wiki page 'REALM_NAME (Realm)' exists it links to that page. If not but 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.

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
}}

Displays a link to the realm page.

Using Numeric Parameters

{{HadezUtilRealmLink|REALM_NAME}}