Template:Plinkt/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 table''' template is a variant of {{t|plink}} used to created image-and-text links within tables. ==Usage== ===1=== The first unnamed parameter takes the name of the page to be linked to. The template will automatically use the same name for the image shown in the first column. {|class="wikitable" |+ Example !Code ! colspan="2" |Produces !Standard syntax |- |<code><nowiki>{{plinkt|Hammermage potion}}</nowiki></code> |{{plinkt|Hamm...")
 
No edit summary
 
Line 13: Line 13:
!Standard syntax
!Standard syntax
|-
|-
|<code><nowiki>{{plinkt|Hammermage potion}}</nowiki></code>
|<code><nowiki>{{plinkt|Bucket}}</nowiki></code>
|{{plinkt|Hammermage potion}}
|{{plinkt|Bucket}}
| <pre>
| <pre>
| [[File:Hammermage potion.png|link=Hammermage potion]]
| [[File:Bucket.png|link=Bucket]]
| [[Hammermage potion]]
| [[Bucket]]
</pre>
</pre>
|}
|}
Line 30: Line 30:
!Standard syntax
!Standard syntax
|-
|-
|<code><nowiki>{{plinkt|Hammermage potion|pic=Brown Kelp}}</nowiki></code>
|<code><nowiki>{{plinkt|Bucket|pic=Brown Kelp}}</nowiki></code>
|{{plinkt|Hammermage potion|pic=Brown Kelp}}
|{{plinkt|Bucket|pic=Brown Kelp}}
| <pre>
| <pre>
| [[File:Brown Kelp.png|link=Hammermage potion]]
| [[File:Brown Kelp.png|link=Bucket]]
| [[Hammermage potion]]
| [[Bucket]]
</pre>
</pre>
|}
|}
Line 46: Line 46:
! Standard syntax
! Standard syntax
|-
|-
| <code><nowiki>{{plinkt|Hammermage potion|border=no}}</nowiki></code>
| <code><nowiki>{{plinkt|Bucket|border=no}}</nowiki></code>
| {{plinkt|Hammermage potion|border=no}}
| {{plinkt|Bucket|border=no}}
| <pre>
| <pre>
| style="border-right: none;" | [[File:Hammermage potion.png|link=Hammermage potion]]
| style="border-right: none;" | [[File:Bucket.png|link=Bucket]]
| style="border-left: none;" | [[Hammermage potion]]
| style="border-left: none;" | [[Bucket]]
</pre>
</pre>
|}
|}
Line 61: Line 61:
!Standard syntax
!Standard syntax
|-
|-
| <code><nowiki>{{plinkt|Hammermage potion|link=Brown Kelp}}</nowiki></code>
| <code><nowiki>{{plinkt|Bucket|link=Brown Kelp}}</nowiki></code>
| {{plinkt|Hammermage potion|link=Brown Kelp}}
| {{plinkt|Bucket|link=Brown Kelp}}
| <pre>
| <pre>
| [[File:Hammermage potion.png|link=Brown Kelp]]
| [[File:Bucket.png|link=Brown Kelp]]
| [[Brown Kelp|Hammermage potion]]
| [[Brown Kelp|Bucket]]
</pre>
</pre>
|-
|-
| <code><nowiki>{{plinkt|Hammermage potion|link=no}}</nowiki></code>
| <code><nowiki>{{plinkt|Bucket|link=no}}</nowiki></code>
| {{plinkt|Hammermage potion|link=no}}
| {{plinkt|Bucket|link=no}}
| <pre>
| <pre>
| [[File:Hammermage potion.png|link=]]
| [[File:Bucket.png|link=]]
| Bucket
| Hammermage potion
</pre>
</pre>
|}
|}

Latest revision as of 07:38, 21 November 2024

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

The picture link table template is a variant of {{plink}} used to created image-and-text links within tables.

Usage

1

The first unnamed parameter takes the name of the page to be linked to. The template will automatically use the same name for the image shown in the first column.

Example
Code Produces Standard syntax
{{plinkt|Bucket}}
| [[File:Bucket.png|link=Bucket]]
| [[Bucket]]

pic

If included, this changes the filename used; defaults to the first parameter. Do not include "File:" or ".png"

Example
Code Produces Standard syntax
{{plinkt|Bucket|pic=Brown Kelp}}
| [[File:Brown Kelp.png|link=Bucket]]
| [[Bucket]]

border

Use the parameter border=no if the border between the picture and text cells should be removed. If the parameter is not given, the border will not be removed.

Examples
Code Produces Standard syntax
{{plinkt|Bucket|border=no}}
| style="border-right:	none;" | [[File:Bucket.png|link=Bucket]]
| style="border-left:	none;" | [[Bucket]]

link

Use the parameter link= to set the target page to link to, use link=no to produce plain text:

Code Produces Standard syntax
{{plinkt|Bucket|link=Brown Kelp}}
| [[File:Bucket.png|link=Brown Kelp]]
| [[Brown Kelp|Bucket]]
{{plinkt|Bucket|link=no}}
| [[File:Bucket.png|link=]]
| Bucket

rowspan

Use the parameter rowspan= to control how many rows to output:

Code Produces Standard syntax
| {{plinkt|Jellied Eels|rowspan=4}}
| {{plinkt|Lesser Jellied Eels}}
|-
| {{plinkt|Gray Jellied Eels}}
|-
| {{plinkt|Rocky Jellied Eels}}
|-
| {{plinkt|Rord Jellied Eels}}
| rowspan="6" | [[File:Jellied Eels.png]]
| rowspan="6" | [[Jellied Eels]]
| [[File:Lesser Jellied Eels.png]]
| [[Lesser Jellied Eels]]
|-
| [[File:Gray Jellied Eels.png]]
| [[Gray Jellied Eels]]
|-
| [[File:Rocky Jellied Eels.png]]
| [[Rocky Jellied Eels]]
|-
| [[File:Rord Jellied Eels.png]]
| [[Rord Jellied Eels]]

size

The size of an image if the image is too big. Only numbers are allowed; "px" is already included in the code.

width

Adjusts the width of the text cell only - without this, adjusting the width like | width="200" {{Plinkt|Bucket}} will increase the size of both cells. Only numbers are allowed; "px" is already included in the code. This only needs to be set once, on the first row of the table.

Primarily used to ensure consistent column widths across separate tables, as shown below.

Without width set:

Item Cost
20 Copper
20 Copper
File:Fishing Spear.png 12 Silver
Item Cost
20 Copper
20 Copper

With width set:

Item Cost
20 Copper
20 Copper
File:Fishing Spear.png 12 Silver
Item Cost
20 Copper
20 Copper

See also

Template data

Show/hide template's data

The following information is used by extensions and applications, such as VisualEditor, to help users implement this template onto pages. Please ensure that it is up-to-date.

A variant of the "Picture Link" (plink) template, "Picture Link Table" (plinkt) is used to display an item image and text link across two table cells.

Template parameters

ParameterDescriptionTypeStatus
Item1

The item to link to and display

Page namerequired
Imagepic

The name of the image file. Defaults to the Item param.

Default
{{{1}}}
Stringoptional
Labeltxt

Override the displayed link text.

Default
{{{1}}}
Stringoptional
Linklink

The target page to link to.

Set to "no" to produce plain text.

Suggested values
no
Default
{{{1}}}
Page nameoptional
Borderborder

Set to "no" to hide the border between the picture and text cells

Default
0
Auto value
1
Booleanoptional
Sizesize

The size of the image if resizing is needed ("px" is already appended)

Stringoptional
Row Spanrowspan

How many rows should the picture link span

Default
1
Numberoptional