Template:ItemTile: Difference between revisions
Jump to navigation
Jump to search
m (reorg var templatedata) |
(added no wrap to prevent labels from wrapping?) Tag: Reverted |
||
| Line 1: | Line 1: | ||
<includeonly><onlyinclude> <!-- NOTE: A lot of the parser logic may seem overly complicated, but they are all necessary to handle the colon at the front of :Category links properly --> | <includeonly><onlyinclude> <!-- NOTE: A lot of the parser logic may seem overly complicated, but they are all necessary to handle the colon at the front of :Category links properly --> | ||
<div style="display:flex; flex-direction:column; align-items:center; gap:4px; width:{{{width|245px}}}; font-size:{{{font|100%}}}; {{Yesno|{{{bold|yes}}}|yes=font-weight:bold;}}"> | <div style="display:flex; flex-direction:column; align-items:center; white-space:nowrap; gap:4px; width:{{{width|245px}}}; font-size:{{{font|100%}}}; {{Yesno|{{{bold|yes}}}|yes=font-weight:bold;}}"> | ||
{{ #ifeq: {{lc: {{{label|}}} }} | top | {{ #if: {{{link|}}} | <div>[[{{{link}}}|{{{title}}}]]</div> | <div>[[{{{title}}}]]</div> }} }} | {{ #ifeq: {{lc: {{{label|}}} }} | top | {{ #if: {{{link|}}} | <div>[[{{{link}}}|{{{title}}}]]</div> | <div>[[{{{title}}}]]</div> }} }} | ||
<div>[[File:{{{image}}}|link={{ #if: {{{link|}}} | {{ #ifeq: {{ #sub: {{{link}}} | 0 | 1 }} | : | {{ #sub: {{{link}}} | 1 }} | {{{link}}} }} | {{{title}}} }}]]</div> | <div>[[File:{{{image}}}|link={{ #if: {{{link|}}} | {{ #ifeq: {{ #sub: {{{link}}} | 0 | 1 }} | : | {{ #sub: {{{link}}} | 1 }} | {{{link}}} }} | {{{title}}} }}]]</div> | ||
Revision as of 14:40, 31 March 2026
Usage Examples
TemplateData
Displays a clickable image tile with a linked label.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Image | image | Full file name with extension. | File | required |
| Item Name | title | Displayed name of the item. Used as the link target as well if `link` is not specified. | String | required |
| Link | link | Overrides `title` as the link target. Supports Category links using the `:Category:Name` format. | Page name | optional |
| Label | label | Position of display label relative to the image.
| String | optional |
| Width | width | Width of the tile. Units must be specified.
| Number | optional |
| Font Size | font | Font size of the display label. Units must be specified.
| String | optional |
| Bolded text | bold | Whether the display label is bolded.
| Boolean | optional |
