Template:Plink/doc: Difference between revisions

From Brighter Shores Wiki
Jump to navigation Jump to search
Content added Content deleted
(Created page with "{{Documentation}} The '''picture link''' template creates an image and links it to the page as well as including text. 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 !...")
 
No edit summary
Line 18: Line 18:
|<code><nowiki>[[File:Hammermage potion.png|link=Hammermage potion]] [[Hammermage potion]]</nowiki></code>
|<code><nowiki>[[File:Hammermage potion.png|link=Hammermage potion]] [[Hammermage potion]]</nowiki></code>
|-
|-
|<code><nowiki>{{plink|Hammermage potion|size=32}}</nowiki></code>
|<code><nowiki>{{plink|Hammermage potion|size=50}}</nowiki></code>
|{{plink|Hammermage potion|size=32}}
|{{plink|Hammermage potion|size=50}}
|<code><nowiki>[[File:Hammermage potion.png|32px|link=Hammermage potion]] [[Hammermage potion]]</nowiki></code>
|<code><nowiki>[[File:Hammermage potion.png|50px|link=Hammermage potion]] [[Hammermage potion]]</nowiki></code>
|-
|-
|<code><nowiki>{{plink|Health potion|pic=Hammermage potion}}</nowiki></code>
|<code><nowiki>{{plink|Health potion|pic=Hammermage potion}}</nowiki></code>

Revision as of 23:22, 1 November 2024

This is a documentation subpage for Template:Plink.
It contains usage information, categories, and other content that is not part of the original template page.

The picture link template creates an image and links it to the page as well as including text.

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|Hammermage potion}} File:Hammermage potion.pngHammermage potion [[File:Hammermage potion.png|link=Hammermage potion]] [[Hammermage potion]]
{{plink|Hammermage potion|size=50}} File:Hammermage potion.pngHammermage potion [[File:Hammermage potion.png|50px|link=Hammermage potion]] [[Hammermage potion]]
{{plink|Health potion|pic=Hammermage potion}} File:Hammermage potion.pngHealth potion [[File:Hammermage potion.png|link=Health potion]] [[Health potion]]
{{plink|Hammermage potion|txt=Potion}} File:Hammermage potion.pngPotion [[File:Hammermage potion.png|link=Hammermage potion]] [[Hammermage potion|Potion]]
{{plink|Health potion|pic=Hammermage potion|txt=Potion}} File:Hammermage potion.pngPotion [[File:Hammermage potion.png|link=Health potion]] [[Health potion|Potion]]

Parameters

The 'Picture Link' (plink) template is used to create item image + text links.

Template parameters

ParameterDescriptionTypeStatus
Item1

The item to link to and display

Page namerequired
Picturepic

The name of the image file; do not include 'File:' or '.png'

Default
First parameter
Fileoptional
Text overridetxt

Override the displayed link text.

Default
First parameter
Stringoptional
Sizesize

Sets custom size (in px).

Numberoptional