Template:HadezUtilFamilyLinks

From BattleMaster Wiki
Jump to navigation Jump to search
Template-info.svg Template Documentation
This documentation is transcluded from Template:HadezUtilFamilyLinks/doc.

ExamplesSandbox

Summary

A utility template - shows a character's full name as links to family page and character sub-page if those pages exist.

Optionally the template can be told not to link to a specific family or character (to suppress 'self-links', see below).

Assumes family sub-page will be at 'FAMILY_NAME Family'
Assumes character sub-page will be at 'FAMILY_NAME Family/CHARACTER_NAME'

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

family or param #1 - (required) - character family name as given in the game.
char or param #2 - (required) - character name as given in the game.
suppress_family or param #3- (optional) - family name, do not link to family page even if it exists.
suppress_char or param #4 - (optional) - character name, do not link to character page even if it exists.

one, both or neither of suppress_family and suppress_char can be used.

Usage

Using Named Parameters

{{HadezUtilFamilyLinks
| char=CHARACTER_NAME
| family=FAMILY_NAME
}}

Shows the text CHARACTER_NAME FAMILY_NAME.
If a family page named 'FAMILY_NAME Family' exists links FAMILY_NAME to that page.
If a character page named 'FAMILY_NAME Family/CHARACTER NAME' exists links CHARACTER_NAME to that page.

{{HadezUtilFamilyLinks
| family=FAMILY_NAME_TO_SUPPRESS
| char=CHARACTER_NAME
| suppress_family=FAMILY_NAME_TO_SUPPRESS
| suppress_char=CHARACTER_NAME_TO_SUPPRESS
}}

As above but even if a family page for FAMILY_NAME_TO_SUPPRESS or character page for CHARACTER_NAME_TO_SUPPRESS exists does not link to it.

This is mainly used where this utility template is used from another template for dynamically generated lists on family or character pages (like lists of other families/characters in a character's realm). It is used to suppress 'self-links' where the link would be to the page that the output of this template is ultimately displayed on. Self-links are put in bold text by the wiki engine which is ugly IMHO.


Using Numeric Parameters

{{HadezUtilFamilyLinks|FAMILY_NAME|CHARACTER_NAME}}

{{HadezUtilFamilyLinks|FAMILY_NAME|CHARACTER_NAME|FAMILY_NAME_TO_SUPPRESS|CHARACTER_NAME_TO_SUPPRESS}}

If omitting FAMILY_NAME_TO_SUPPRESS remember to provide a blank value for it..

{{HadezUtilFamilyLinks|CHARACTER_NAME|FAMILY_NAME||CHARACTER_NAME_TO_SUPPRESS}}

You can also mix up the order of numeric parameters so long as you specify the parameter numbers..

{{HadezUtilFamilyLinks|3=FAMILY_NAME_TO_SUPPRESS|2=CHARACTER_NAME|4=CHARACTER_NAME_TO_SUPPRESS|1=FAMILY_NAME}}