Template:ItemTile: Difference between revisions

From Dune: Awakening Community Wiki
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.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Imageimage

Full file name with extension.

Filerequired
Item Nametitle

Displayed name of the item. Used as the link target as well if `link` is not specified.

Stringrequired
Linklink

Overrides `title` as the link target. Supports Category links using the `:Category:Name` format.

Page nameoptional
Labellabel

Position of display label relative to the image.

Suggested values
top bottom
Default
bottom
Stringoptional
Widthwidth

Width of the tile. Units must be specified.

Default
256px
Numberoptional
Font Sizefont

Font size of the display label. Units must be specified.

Default
100%
Stringoptional
Bolded textbold

Whether the display label is bolded.

Suggested values
true false
Default
true
Booleanoptional