Template:Character Label: Difference between revisions

Template page
(Created page with "<includeonly>{{#vardefine:query|{{#cargo_query:table=heroes|fields=CONCAT(image)|where=_pageName="{{{1}}}"|group by=_pageID|no html|default=File:Unknown Character icon.png}}}}...")
 
No edit summary
Line 1: Line 1:
<includeonly>{{#vardefine:query|{{#cargo_query:table=heroes|fields=CONCAT(image)|where=_pageName="{{{1}}}"|group by=_pageID|no html|default=File:Unknown Character icon.png}}}}<!--
<includeonly>{{#vardefine:query|{{#cargo_query:table=heroes|fields=CONCAT(image)|where=_pageName="{{{1}}}/{{{2}}}"|group by=_pageID|no html|default=File:Unknown Character icon.png}}}}<!--


--><div style="margin:7px 5px 0px; vertical-align:center; text-align:center; display:inline-block; line-height:normal; width:{{{2|80px}}};">
--><div style="margin:7px 5px 0px; vertical-align:center; text-align:center; display:inline-block; line-height:normal; width:{{{3|80px}}};">
{{#if:{{{border|}}}|<div style="margin-bottom:5px; box-shadow:0px 0px 2px 4px {{{border}}};">[[{{#var:query}}|{{{2|80px}}}|link={{{1|#}}}]]</div>|[[{{#var:query}}|{{{2|80px}}}|link={{{1|#}}}]]}}</div> <div style="font-size:12pt;display:inline;">'''[[{{{1|Unknown Character}}}]]'''</div></includeonly><noinclude>
{{#if:{{{border|}}}|<div style="margin-bottom:5px; box-shadow:0px 0px 2px 4px {{{border}}};">[[{{#var:query}}|{{{3|80px}}}|link={{{2|#}}}]]</div>|[[{{#var:query}}|{{{3|80px}}}|link={{{2|#}}}]]}}</div> <div style="font-size:12pt;display:inline;">'''[[{{{2|Unknown Character}}}]]'''</div></includeonly><noinclude>
{{Doc}}
{{Doc}}
[[Category:Navigational templates]]
[[Category:Navigational templates]]

Revision as of 12:53, 2 December 2019

Arguments

If one unnamed arg is given (e.g. {{Character Label|Sol}}):
 1st arg = Character Name
 The template will default to the game from the RootPageName of the current page
If two unnamed args are given (e.g. {{Character Label|GGACR|Sol}}):
 1st arg = Game Code
 2nd arg = Character Name
If no unnamed args are given, the template will default to the game and character of the current page

"size" = icon size (optional)
"icon" = icon override (optional)
"label" = text override (optional)
"linkOverride" = link override (optional)
"format" = none/italic/bold (optional). Default to bold
"L" = put something into this field to disable links (Use with either format=none, label=, or P=)
"P" = put something into this field to remove the text from the label

Usage

  • Icon default size is 24px.
   {{character Label|GGACR|Slayer}}
   {{character Label|GGACR|Venom|120px}}
  • Does not work within section headers.
   ===={{character Label|GGACR|Venom}}====

Full Args

{{character Label|GGACR|Venom|120px|icon=OverrideIconToUse.png|label=OverrideNameToShow|linkOverride=OverrideLink|format=TextFormat}}
  • Can also be used with CLabel shorthand.
   {{CLabel|GGACR|Ky Kiske}}

Example

[[
Error: Table heroes not found.
|80px|link=Venom]]
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
[[
Error: Table heroes not found.
|80px|link=Goldlewis Dickinson]]
Maecenas quis felis volutpat, cursus dolor vel, bibendum urna.
[[
Error: Table heroes not found.
|80px|link=Testament]]
Duis dignissim posuere justo, vitae sodales felis aliquam sit amet.
[[
Error: Table heroes not found.
|80px|link=Happy Chaos]]
Donec efficitur ante ac dolor convallis volutpat.

Example without size value

[[
Error: Table heroes not found.
|80px|link=Venom]]

Example with size value

[[
Error: Table heroes not found.
|80px|link=Ky Kiske]]

Example with size, and name override values

This links to Ky's page
[[
Error: Table heroes not found.
|80px|link=Ky Kiske]]

Example with rectangular size

default size

[[
Error: Table heroes not found.
|80px|link=Nagoriyuki]]

larger size

[[
Error: Table heroes not found.
|80px|link=Nagoriyuki]]

zh:Template:Character label