Template:Hyperlink: Difference between revisions
From Official Barotrauma Wiki
Jade Harley (talk | contribs) mNo edit summary |
(Limit the default height to 30px (same as width), so that the images that are more tall than wide (e.g. Acid Grenade) don't completly blow up the line) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{doc}}<includeonly><onlyinclude><span style="white-space: nowrap">[[File:{{#switch:{{lc:{{{3|}}}}}|icon={{{1}}}_icon|sprite={{{1}}}_sprite|talent=Talent_{{{1}}}|affliction=Affliction_{{{1}}}|talentaffliction=Talent_Affliction_{{{1}}}|geneticaffliction=Genetic_Affliction_{{{1}}}|faction=Faction_{{{1}}}|#default={{{3|{{{1}}}}}}}} | {{doc}}<includeonly><onlyinclude><span style="white-space: nowrap">[[File:{{#switch:{{lc:{{{3|}}}}}|icon={{{1}}}_icon.png|sprite={{{1}}}_sprite|talent=Talent_{{{1}}}.png|affliction=Affliction_{{{1}}}.png|talentaffliction=Talent_Affliction_{{{1}}}.png|geneticaffliction=Genetic_Affliction_{{{1}}}.png|faction=Faction_{{{1}}}.png|achievement=Achievement_{{{1}}}.jpg|#default={{{3|{{{1}}}}}}.png}}|{{#if:{{{2|}}}|{{{2}}}|30x30}}px|link={{{4|{{{1}}}}}}]]{{#if:{{{a|}}}|'''{{formatnum:{{{a}}}}}'''}} [[{{{4|{{{1}}}}}}|{{ucfirst:{{{1}}}}}]]{{{s|}}}</span></onlyinclude></includeonly> |
Latest revision as of 22:01, 23 April 2023
This template is used for links in some other templates, such as the universal nav. It can also be used in articles. It creates a link and places an appropriate image to the left of the link.
Syntax
{{Hyperlink|<Name>|<Image size override>|<Image name override>|<Link override>|s=<Suffix>}}
- By default the image and link will be the same as the name
- Default image size is 30x30(px). First number is the width, second is the height, you are free to omit either.
- Adding "s=s" allows the s to be included in the link, instead of the regular (beige) color being used if it was added after the template's closing braces
- The suffix parameter (s=...) can be placed in any position since it is a named parameter
Examples
{{Hyperlink|Tiger Thresher}}gives: Tiger Thresher
{{Hyperlink|Diving Mask|50}}gives: Diving Mask
{{Hyperlink|Jumpsuit|3=Uniform}}gives: Jumpsuit
{{Hyperlink|Revolver|s=s}}gives: Revolvers ( as opposed to Revolvers )
{{Hyperlink|Crawler|s=s|100|Husked Crawler}}gives: Crawlers
{{Hyperlink|Crawler|s=s|x40|Husked Crawler}}gives: Crawlers (specifying the height of the image this time, rather than the width)
The above documentation is transcluded from Template:Hyperlink/doc. (edit | history)