Template:Hyperlink/doc: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
m (the default image size is now 30x30, not just 30)
m (+ example of height limit)
 
Line 6: Line 6:
</pre>
</pre>
*By default the image and link will be the same as the name
*By default the image and link will be the same as the name
*Default image size is 30x30(px)
*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
*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
*The suffix parameter (s=...) can be placed in any position since it is a named parameter
Line 15: Line 15:
<pre>{{Hyperlink|Revolver|s=s}}</pre> gives: {{Hyperlink|Revolver|s=s}} ( as opposed to {{Hyperlink|Revolver}}s )
<pre>{{Hyperlink|Revolver|s=s}}</pre> gives: {{Hyperlink|Revolver|s=s}} ( as opposed to {{Hyperlink|Revolver}}s )
<pre>{{Hyperlink|Crawler|s=s|100|Husked Crawler}}</pre> gives: {{Hyperlink|Crawler|s=s|100|Husked Crawler}}  
<pre>{{Hyperlink|Crawler|s=s|100|Husked Crawler}}</pre> gives: {{Hyperlink|Crawler|s=s|100|Husked Crawler}}  
<pre>{{Hyperlink|Crawler|s=s|x40|Husked Crawler}}</pre> gives: {{Hyperlink|Crawler|s=s|x40|Husked Crawler}} (specifying the height of the image this time, rather than the width)
{{doc/end}}
{{doc/end}}

Latest revision as of 22:04, 23 April 2023

Documentation

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)

This is the documentation page, it should be transcluded into the main template page. See Template:Doc for more information.