Template:HadezUtilFamilyLinks: Difference between revisions
Wraith0x29a (talk | contribs) mNo edit summary |
Wraith0x29a (talk | contribs) mNo edit summary |
||
Line 2: | Line 2: | ||
{{#ifexist: {{{family}}} Family | {{#ifexist: {{{family}}} Family | ||
| {{#ifexist: {{{family}}} Family/{{{char}}} | | {{#ifexist: {{{family}}} Family/{{{char}}} | ||
| {{#ifeq: {{{suppress_char}}} | {{{char}}} | {{{char}}} | [[ {{{family}}} Family/{{{char}}}|{{{char}}} ]] }} | | {{#ifeq: {{{suppress_char}}} | {{{char}}} | {{{char}}} | [[ {{{family}}} Family/{{{char}}}|{{{char}}} ]] }} {{#ifeq: {{{suppress_family}}} | {{{family}}} | {{{family}}} | [[ {{{family}}} Family|{{{family}}} ]] }} | ||
| {{{char}}} {{#ifeq: {{{suppress_family}}} | {{{family}}} | {{{family}}} | [[ {{{family}}} Family|{{{family}}}]] }} | |||
| {{{char}}} | |||
}} | }} | ||
| {{{char}}} {{{family}}} | | {{{char}}} {{{family}}} | ||
}}</includeonly><noinclude>{{Documentation}}</noinclude> | }}</includeonly><noinclude>{{Documentation}}</noinclude> |
Revision as of 20:36, 3 December 2009
Template Documentation |
This documentation is transcluded from Template:HadezUtilFamilyLinks/doc. |
SummaryA 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' 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 Parametersfamily or param #1 - (required) - character family name as given in the game. one, both or neither of suppress_family and suppress_char can be used. UsageUsing Named Parameters {{HadezUtilFamilyLinks Shows the text CHARACTER_NAME FAMILY_NAME. {{HadezUtilFamilyLinks 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.
{{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}} |