Template:Cn: Difference between revisions

From Heroes 3 wiki
Jump to navigation Jump to search
No edit summary
m Reverted edits by Imahero (talk) to last revision by Legate
Tag: Rollback
Line 1: Line 1:
<includeonly>{{swh|noicon=|{{exist|File:Creature portrait {{{image|{{{1}}}}}} (HotA) small.gif|[[File:Creature portrait {{{image|{{{1}}}}}} (HotA) small.gif|{{{1}}}|link={{{2|{{{1}}}}}}{{{border|}}}]]|[[File: Creature portrait {{{image|{{{1}}}}}} small.gif|{{{1}}}|link={{{2|{{{1}}}}}}{{{border|}}}]]}}|[[File:Creature portrait {{{image|{{{1}}}}}} small.gif|{{{1}}}|link={{{2|{{{1}}}}}}{{{border|}}}]]}}{{-}}{{{noname|{{hoverable|{{{2|{{{1}}}}}}|text={{{name|{{{1}}}}}}|{{#invoke:String|replace|CreaturePopup{{{2|{{{1}}}}}}| |_}}}}{{exists|page=Template:Creature{{#switch:{{#invoke:String|find|{{{2|{{{1}}}}}}| and }}| 0 = | s}}/{{{2|{{{1}}}}}}|then={{Creature{{#switch:{{#invoke:String|find|{{{2|{{{1}}}}}}| and }}| 0 = | s}}/{{{2|{{{1}}}}}}|popupid={{#invoke:String|replace|CreaturePopup{{{2|{{{1}}}}}}| |_}}}}|else=}}}}}</includeonly><noinclude>
<includeonly>{{swh|noicon=|{{exist|File:Creature portrait {{{image|{{{1}}}}}} (HotA) small.gif|[[File:Creature portrait {{{image|{{{1}}}}}} (HotA) small.gif|{{{1}}}|link={{{2|{{{1}}}}}}{{{border|}}}]]|[[File: Creature portrait {{{image|{{{1}}}}}} small.gif|{{{1}}}|link={{{2|{{{1}}}}}}{{{border|}}}]]}}|[[File:Creature portrait {{{image|{{{1}}}}}} small.gif|{{{1}}}|link={{{2|{{{1}}}}}}{{{border|}}}]]}}{{-}}{{{noname|[[{{{2|{{{1}}}}}}|{{{name|{{{1}}}}}}]]}}}</includeonly><noinclude>
<!-- The first usage of Template:Exist seems ok but the second one requires Template:Exists instead of Template:Exist to avoid a template loop. -->
'''Cn''' is short of creature name.
'''Cn''' is short of creature name.


Line 26: Line 25:
| {{cn|Rogue|image=Orc Chieftain (HotA)}} || <pre>{{cn|Rogue|image=Orc Chieftain (HotA)}}</pre>
| {{cn|Rogue|image=Orc Chieftain (HotA)}} || <pre>{{cn|Rogue|image=Orc Chieftain (HotA)}}</pre>
|}
|}


[[Category: Table templates|Creature name]]
[[Category: Table templates|Creature name]]
__NOTOC__</noinclude>
__NOTOC__</noinclude>

Revision as of 03:21, 26 August 2025

Cn is short of creature name.

Use

The template is used to show a creature's image and a name, both leading to the creature article. The variables for the template are:

  1. = Creature name
  2. = Link (if needed)
  • image= to override the name used for the image
  • noname= for a creature portrait without text
  • name= for a custom naming
  • border= ...not sure?

Test

RogueRogue Rogue, Black KnightBlack Knight Black Knight, RogueRogue NomadNomad Rogues and Nomads, HalflingHalfling Halflings and Halfling and Halfling GrenadierHalfling and Halfling Grenadier Factory Halflings, RogueRogue Rogue

Examples

RogueRogue Rogue
{{Cn|Rogue}}
RogueRogue NomadNomad Rogues and Nomads
{{Cn|Rogue|noname=}}{{Cn|Nomad|name=Rogues and Nomads|Troll}}
HalflingHalfling Halflings and Halfling and Halfling GrenadierHalfling and Halfling Grenadier Factory Halflings
{{Cn|Halfling|name=Halflings}} and {{Cn|Halfling and Halfling Grenadier|image=Halfling (Factory)|name=Factory Halflings}}
RogueRogue Rogue
{{cn|Rogue|image=Orc Chieftain (HotA)}}