Template:Plink: Difference between revisions

From OtherX
Jump to navigation Jump to search
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><span class="plink-template">[[File:{{{pic|{{{1}}}}}}.png|link={{{1}}}|{{{width|40px}}}]]</span>[[{{{1}}}|{{{txt|{{{1}}}}}}]]</includeonly><noinclude>{{/doc}}</noinclude>
<includeonly><div style="display: inline-block;">[[File:{{{pic|{{{1}}}}}}.png|link={{{1}}}|{{{width|40px}}}]] [[{{{1}}} | {{{txt|}}}]]</div></includeonly><noinclude>{{/doc}}</noinclude>
<!--
<!--
<includeonly><div style="display: inline-block;"><span class="plink-template">[[File:{{{pic|{{{1}}}}}}.png|link={{{1}}}|{{{width|40px}}}]]</span> [[{{{1}}}]]</div></includeonly><noinclude>{{/doc}}</noinclude>
<includeonly><span class="plink-template">[[File:{{{pic|{{{1}}}}}}.png|link={{{1}}}|{{{width|40px}}}]]</span>[[{{{1}}}|{{{txt|{{{1}}}}}}]]</includeonly><noinclude>{{/doc}}</noinclude>
<includeonly><span class="plink-template">[[File:{{{pic|{{{1}}}}}}.png|link={{{1}}}|{{{width|40px}}}]]</span>[[{{{1}}}|{{{txt|{{{1}}}}}}]]</includeonly><noinclude>{{/doc}}</noinclude>
-->
-->

Latest revision as of 21:43, 29 January 2024

Template documentation
This documentation is transcluded from Template:Plink/doc. [edit] [history] [purge]

The picture link template creates an image and links it to the page as well as including text. For a textless version, use {{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

{{plink|item|pic=file name|txt=text}}

Examples

Examples
Code Produces Standard syntax
{{plink|Master Chest}} [[File:Master Chest.png|link=Master Chest]] [[Master Chest]]
{{plink|Granite maul|pic=Abyssal whip}} [[File:Abyssal whip.png|link=Granite maul]] [[Granite maul]]
{{plink|Abyssal whip|txt=Whip}} [[File:Abyssal whip.png|link=Abyssal whip]] [[Abyssal whip|Whip]]
{{plink|Granite maul|pic=Abyssal whip|txt=Whip}} [[File:Abyssal whip.png|link=Granite maul]] [[Granite maul|Whip]]

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"
       },
       "txt": {
           "label": "Text override",
           "description": "Override the displayed link text.",
           "default": "First parameter",
           "type": "string"
       }
   }

} </templatedata>