(Created page with "https://oldschool.runescape.wiki/w/Template:Plink/doc") |
No edit summary |
||
Line 1: | Line 1: | ||
{{Documentation}} | |||
The '''picture link''' template creates an image and links it to the page as well as including text. For a textless version, use {{t|plinkp}}. | |||
This template is not intended to be commonly used in mainspace articles. It is primarily used in navboxes and tables to add images to help with navigation. In most other cases, pages should be linked with normal markup and without an image. | |||
==Usage== | |||
<pre>{{plink|item|pic=file name|txt=text}}</pre> | |||
==Examples== | |||
{|class="wikitable" | |||
|+ Examples | |||
!Code | |||
! style="min-width:150px;" | Produces | |||
!Standard syntax | |||
|- | |||
|<code><nowiki>{{plink|Abyssal whip}}</nowiki></code> | |||
|{{plink|Abyssal whip}} | |||
|<code><nowiki>[[File:Abyssal whip.png|link=Abyssal whip]] [[Abyssal whip]]</nowiki></code> | |||
|- | |||
|<code><nowiki>{{plink|Granite maul|pic=Abyssal whip}}</nowiki></code> | |||
|{{plink|Granite maul|pic=Abyssal whip}} | |||
|<code><nowiki>[[File:Abyssal whip.png|link=Granite maul]] [[Granite maul]]</nowiki></code> | |||
|- | |||
|<code><nowiki>{{plink|Abyssal whip|txt=Whip}}</nowiki></code> | |||
|{{plink|Abyssal whip|txt=Whip}} | |||
|<code><nowiki>[[File:Abyssal whip.png|link=Abyssal whip]] [[Abyssal whip|Whip]]</nowiki></code> | |||
|- | |||
|<code><nowiki>{{plink|Granite maul|pic=Abyssal whip|txt=Whip}}</nowiki></code> | |||
|{{plink|Granite maul|pic=Abyssal whip|txt=Whip}} | |||
|<code><nowiki>[[File:Abyssal whip.png|link=Granite maul]] [[Granite maul|Whip]]</nowiki></code> | |||
|- | |||
|<code><nowiki>{{plink|Imbued god capes|gif=yes}}</nowiki></code> | |||
|{{plink|Imbued god capes|gif=yes}} | |||
|<code><nowiki>[[File:Imbued god capes.gif|link=Imbued god capes]] [[Imbued god capes]]</nowiki></code> | |||
|} | |||
==See also== | |||
* [[Template:Plinkp]] | |||
* [[Template:Plinkt]] | |||
* [[Template:Ilink]] | |||
* [[Template:Ilinkt]] | |||
* [[Template:Elink]] | |||
==Parameters== | |||
<templatedata> | |||
{ | |||
"description": "The 'Picture Link' (plink) template is used to create item image + text links.", | |||
"params": { | |||
"1": { | |||
"label": "Item", | |||
"description": "The item to link to and display", | |||
"type": "wiki-page-name", | |||
"required": true | |||
}, | |||
"pic": { | |||
"label": "Picture", | |||
"description": "The name of the image file; do not include 'File:' or '.png'", | |||
"default": "First parameter", | |||
"type": "wiki-file-name" | |||
}, | |||
"gif": { | |||
"label": "Gif", | |||
"description": "Set to 'yes' to change the file extension from '.png' to '.gif'", | |||
"default": "'no'", | |||
"type": "string" | |||
}, | |||
"txt": { | |||
"label": "Text override", | |||
"description": "Override the displayed link text.", | |||
"default": "First parameter", | |||
"type": "string" | |||
} | |||
} | |||
} | |||
</templatedata> | |||
<includeonly>[[Category:Link creating templates|{{PAGENAME}}]]</includeonly> |
Latest revision as of 05:55, 5 March 2023
{{#invoke:Documentation|doc}} The picture link template creates an image and links it to the page as well as including text. For a textless version, use {{#invoke:T|main}}.
This template is not intended to be commonly used in mainspace articles. It is primarily used in navboxes and tables to add images to help with navigation. In most other cases, pages should be linked with normal markup and without an image.
Usage
{{plink|item|pic=file name|txt=text}}
Examples
Code | Produces | Standard syntax |
---|---|---|
{{plink|Abyssal whip}}
|
Abyssal whip | [[File:Abyssal whip.png|link=Abyssal whip]] [[Abyssal whip]]
|
{{plink|Granite maul|pic=Abyssal whip}}
|
Granite maul | [[File:Abyssal whip.png|link=Granite maul]] [[Granite maul]]
|
{{plink|Abyssal whip|txt=Whip}}
|
Whip | [[File:Abyssal whip.png|link=Abyssal whip]] [[Abyssal whip|Whip]]
|
{{plink|Granite maul|pic=Abyssal whip|txt=Whip}}
|
Whip | [[File:Abyssal whip.png|link=Granite maul]] [[Granite maul|Whip]]
|
{{plink|Imbued god capes|gif=yes}}
|
Imbued god capes | [[File:Imbued god capes.gif|link=Imbued god capes]] [[Imbued god capes]]
|
See also
Parameters
<templatedata> {
"description": "The 'Picture Link' (plink) template is used to create item image + text links.", "params": { "1": { "label": "Item", "description": "The item to link to and display", "type": "wiki-page-name", "required": true }, "pic": { "label": "Picture", "description": "The name of the image file; do not include 'File:' or '.png'", "default": "First parameter", "type": "wiki-file-name" }, "gif": { "label": "Gif", "description": "Set to 'yes' to change the file extension from '.png' to '.gif'", "default": "'no'", "type": "string" }, "txt": { "label": "Text override", "description": "Override the displayed link text.", "default": "First parameter", "type": "string" } }
} </templatedata>