(Create template) |
m (Add TemplateData) |
||
Line 1: | Line 1: | ||
<onlyinclude><includeonly>{{#if:{{{3|}}}|[[File:{{{1}}}|thumb|{{{2}}}|right|{{{3}}}]]|[[File:{{{1}}}|{{{2}}}|right]]}}</includeonly></onlyinclude> | <onlyinclude><includeonly>{{#if:{{{3|}}}|[[File:{{{1}}}|thumb|{{{2}}}|right|{{{3}}}]]|[[File:{{{1}}}|{{{2}}}|right]]}}</includeonly></onlyinclude> | ||
Usage: | Usage: | ||
<code><nowiki>{{image on right|Maze.png|x200px}}</nowiki></code> ⟶ | <code><nowiki>{{image on right|Maze.png|x200px}}</nowiki></code> ⟶ | ||
Line 8: | Line 9: | ||
<br clear="all" /> | <br clear="all" /> | ||
The second parameter should be either a width e.g. <code>400px</code> or a height e.g. <code>x300px</code>; see [[mw:Help:Images#Syntax|docs]]. | The second parameter should be either a width e.g. <code>400px</code> or a height e.g. <code>x300px</code>; see [[mw:Help:Images#Syntax|docs]]. | ||
{{TemplateData preamble}}<templatedata> | |||
{ | |||
"params": { | |||
"1": { | |||
"label": "Filename", | |||
"description": "omit \"File:\"", | |||
"type": "wiki-file-name", | |||
"required": true | |||
}, | |||
"2": { | |||
"label": "Size", | |||
"description": "either a width (400px) or a height (x300px)", | |||
"type": "string", | |||
"required": true | |||
}, | |||
"3": { | |||
"label": "Caption", | |||
"description": "displayed under thumbnail if set", | |||
"type": "line" | |||
} | |||
}, | |||
"description": "Embeds uploaded media as a thumbnail along the right side of the page.", | |||
"paramOrder": [ | |||
"1", | |||
"2", | |||
"3" | |||
], | |||
"format": "inline" | |||
} | |||
</templatedata> |
Revision as of 19:00, 30 October 2023
Usage:
{{image on right|Maze.png|x200px}}
⟶
{{image on right|Maze.png|x200px|Some text}}
⟶
The second parameter should be either a width e.g. 400px
or a height e.g. x300px
; see docs.
The below documentation is automatically generated from JSON. It can be changed by editing this page, but note that it's only the documentation (for the visual editor)—the actual template part must also be edited, manually.
Embeds uploaded media as a thumbnail along the right side of the page.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Filename | 1 | omit "File:" | File | required |
Size | 2 | either a width (400px) or a height (x300px) | String | required |
Caption | 3 | displayed under thumbnail if set | Line | optional |