Template:H: Difference between revisions
Jump to navigation
Jump to search
m Remove need for himage= parameter. The pictures will now automatically update if the hota switch is on and the image exists. |
mNo edit summary |
||
| Line 1: | Line 1: | ||
<includeonly>{{#switch: {{{1}}} | Random = [[File:Hero_Random_small.png|link=]] Random Hero | {{swh|noicon=|{{exist|File:Hero_{{{image|{{{1|}}}}}} (HotA)_small.png|[[File:Hero_{{{image|{{{1|}}}}}} (HotA)_small.png|{{{1}}}|link={{{hero_link|{{{1}}}}}}{{{img-style|}}}]]|[[File:Hero_{{{image|{{{1|}}}}}}_small.png|{{{1}}}|link={{{hero_link|{{{1}}}}}}{{{img-style|}}}]]}}|[[File:Hero_{{{image|{{{1|}}}}}}_small.png|{{{1}}}|link={{{hero_link|{{{1}}}}}}{{{img-style|}}}]]}} {{{noname|[[{{{hero_link|{{{1}}}}}}|{{{1}}}]]{{{source|}}}{{{0| the [[{{{2|}}}]]}}}}}}}}</includeonly><noinclude> | <includeonly>{{#switch: {{{1}}} | Random = [[File:Hero_Random_small.png|link=]] Random Hero | {{swh|noicon=|{{exist|File:Hero_{{{image|{{{1|}}}}}} (HotA)_small.png|[[File:Hero_{{{image|{{{1|}}}}}} (HotA)_small.png|{{{1}}}|link={{{hero_link|{{{1}}}}}}{{{img-style|}}}]]|[[File:Hero_{{{image|{{{1|}}}}}}_small.png|{{{1}}}|link={{{hero_link|{{{1}}}}}}{{{img-style|}}}]]}}|[[File:Hero_{{{image|{{{1|}}}}}}_small.png|{{{1}}}|link={{{hero_link|{{{1}}}}}}{{{img-style|}}}]]}} {{{noname|[[{{{hero_link|{{{1}}}}}}|{{{name|{{{1}}}}}}]]{{{source|}}}{{{0| the [[{{{2|}}}]]}}}}}}}}</includeonly><noinclude> | ||
'''H''' is short of '''H'''ero name. The template is used in lists to [[:Category:Hero_portraits|hero image]] and name with a link to it. | '''H''' is short of '''H'''ero name. The template is used in lists to [[:Category:Hero_portraits|hero image]] and name with a link to it. | ||
| Line 9: | Line 9: | ||
* noname= (only show the picture) | * noname= (only show the picture) | ||
* image= (show a picture that does not match the hero's name) | * image= (show a picture that does not match the hero's name) | ||
* name= (changes the name used in text; alternative to using that name as first parameter and overriding image and hero_link) | |||
==Examples== | ==Examples== | ||
| Line 50: | Line 51: | ||
| {{H|Random}} | | {{H|Random}} | ||
| <nowiki>{{H|Random}}</nowiki> | | <nowiki>{{H|Random}}</nowiki> | ||
|- | |||
| {{H|Jeremy|name=Jeremy Albatross|0=}} | |||
| <nowiki>{{H|Jeremy|name=Jeremy Albatross|0=}}</nowiki> | |||
|} | |} | ||
Revision as of 12:51, 10 April 2025
H is short of Hero name. The template is used in lists to hero image and name with a link to it.
Variables:
- Hero name (can use "Random")
- Hero class
- 0= (don't show the class)
- hero_link= (link to a hero page that doesn't match the hero's name)
- noname= (only show the picture)
- image= (show a picture that does not match the hero's name)
- name= (changes the name used in text; alternative to using that name as first parameter and overriding image and hero_link)
Examples
| Result | Code |
|---|---|
| {{H|Mephala|Ranger}} | |
| {{h|Mephala|0=}} | |
| {{h|Vey|0=}} | |
| {{h|Yog|image=Yog (Wizard)|hero_link=Yog (Wizard)|Wizard}} | |
| {{H|Clancy|noname=}} | |
| {{H|Henrietta|noname=}} | |
| {{H|Henrietta|0=}} | |
| {{H|Henrietta|Mercenary}} | |
| {{H|Random}} | |
| {{H|Jeremy|name=Jeremy Albatross|0=}} |