Template:Plinksized: Difference between revisions
Created page with "<includeonly>[[File:{{{pic|{{{1}}}}}}.png|link={{{1}}}{{#if:{{{size|}}}|{{!}}{{{size}}}px}}|alt={{{1}}}.png: Inventory image of {{{1}}}]] [[{{{1}}}|{{{txt|{{{1}}}}}}]]{{#..." |
Oscillator (talk | contribs) mNo edit summary |
||
| Line 1: | Line 1: | ||
<includeonly>[[File:{{{pic|{{{1}}}}}}.png|link={{{1}}}{{#if:{{{size|}}}|{{!}}{{{size}}}px}}|alt={{{1}}}.png: Inventory image of {{{1}}}]] [[{{{1}}}|{{{txt|{{{1}}}}}}]]{{#if:{{{2|}}}|[[Category:Uses deprecated inline template parameter]]}}{{#if:{{{alt|}}}|[[Category:Uses deprecated inline template parameter]]}}</includeonly><noinclude>{{/doc}}</noinclude> | <includeonly>[[File:{{{pic|{{{1}}}}}}.png|link={{{1}}}{{#if:{{{size|}}}|{{!}}{{{size}}}px}}|alt={{{1}}}.png: Inventory image of {{{1}}}]] [[{{{1}}}|{{{txt|{{{1}}}}}}]]{{#if:{{{2|}}}|[[Category:Uses deprecated inline template parameter]]}}{{#if:{{{alt|}}}|[[Category:Uses deprecated inline template parameter]]}}</includeonly><noinclude>{{/doc}}{{TemplateData|<templatedata> | ||
{ | |||
"params": { | |||
"1": { | |||
"label": "Page", | |||
"description": "This parameter takes the name of the page that the link is for", | |||
"example": "Energy cell", | |||
"type": "string" | |||
}, | |||
"2": {}, | |||
"pic": { | |||
"label": "Pic", | |||
"description": "If included, this changes the filename used; defaults to the first parameter; do not include \"File:\" or \".png\"", | |||
"example": "Energy cell", | |||
"type": "string" | |||
}, | |||
"size": { | |||
"label": "Size", | |||
"description": "The size of an image if the image is too big, only number are allowed, \"px\" is already included in the code.", | |||
"example": "100", | |||
"type": "string" | |||
}, | |||
"txt": { | |||
"label": "Text", | |||
"description": "Alternate text in the link; defaults to the first parameter", | |||
"type": "string" | |||
}, | |||
"alt": {} | |||
}, | |||
"description": "This template creates an image and links it to the page as well as including text as well as resizing it to the given size in pixels.\n\nThis is a variation of Template:Pic link.\n\nUsed in the {{Infobox}} template but can be used anywhere.", | |||
"format": "inline" | |||
} | |||
</templatedata> | |||
}} | |||
</noinclude> | |||
Latest revision as of 22:10, 21 January 2021
This template creates an image and links it to the page as well as including text as well as resizing it to the given size in pixels.
This is a variation of Template:Pic link.
Usage
{{plinksized|item|pic=file name|txt=text|size=size without px}}
1
This parameter takes the name of the page that the link is for
pic
If included, this changes the filename used; defaults to the first parameter; do not include "File:" or ".png"
txt
Alternate text in the link; defaults to the first parameter
size
The size of an image if the image is too big, only number are allowed, "px" is already included in the code.
| Code | Produces | Standard syntax |
|---|---|---|
{{plinksized|Energy Cell}}
|
Energy Cell
|
[[File:Energy Cell.png|link=Energy Cell]] [[Energy Cell]]
|
{{plinksized|Black Ice Shards|pic=Energy Cell}}
|
Black Ice Shards
|
[[File:Energy Cell.png|link=Black Ice Shards]] [[Black Ice Shards]]
|
{{plinksized|Energy Cell|txt=Cell}}
|
Cell
|
[[File:Energy Cell.png|link=Energy Cell]] [[Energy Cell|Cell]]
|
{{plinksized|Black Ice Shards|pic=Energy Cell|txt=Cell}}
|
Cell
|
[[File:Energy Cell.png|link=Black Ice Shards]] [[Black Ice Shards|Cell]]
|
{{plinksized|Energy Cell|pic=Energy Cell|txt=Cell|size=35}}
|
[[File:Energy Cell.png|link=Energy Cell|35px]] [[Energy Cell|Cell]]
|
| 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. This template creates an image and links it to the page as well as including text as well as resizing it to the given size in pixels. This is a variation of Template:Pic link. Used in the {{Infobox}} template but can be used anywhere.
|
|||||||||||||||||||||||||||||||||||
