Template:Plink

From Idle Clans wiki
Revision as of 15:22, 24 May 2024 by Uraxys (talk | contribs) (Created page with "<onlyinclude><includeonly>{{#if: {{{1}}} | [[File:{{#if: {{{img|}}} | {{{img}}} | {{{1}}} }}.png|{{#if: {{{size|}}} | {{{size}}} | 24 }}px|link={{{1}}}]] [[{{{1}}}{{#if: {{{txt|}}} | {{!}}{{{txt}}} | }}]] | Error: No link specified in plink template. }}</includeonly></onlyinclude>{{/doc}}")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Create a plink (picture link) to easily display an image that also functions as a link to a specified page.

Usage

{{Plink|<link>|[txt=<text>]|[img=<image>]|[size=<image size>]}}

  • link: The name of the page to link to.
  • (Optional) txt: If provided, this will be used as the text; if not, the link will be used.
  • (Optional) img: If provided, this will be used as the image; if not; the link will be used.
  • (Optional) size: If provided, this will be used as the image size in pixels; if not; 24 is used.

Example

Input Output
{{Plink|Normal longsword}} Normal longsword.png Normal longsword
{{Plink|Iron bar|size=30}} Iron bar.png Iron bar
{{Plink|Godlike pickaxe|txt=best pickaxe}} Godlike pickaxe.png best pickaxe
{{Plink|Common treasure chest|img=Common chest}} Common chest.png Common treasure chest
{{Plink|Coal ore|txt=Gold?|img=Gold bar}} Gold bar.png Gold?