Template:Content description: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
No edit summary
mNo edit summary
Line 1: Line 1:
<includeonly>{{#ifeq:{{{wikitable}}}|y|{{{!}}class="{{#ifeq:{{{dk}}}|y|dktable-brown|wikitable}}" style="width:100%;text-align:center"|}}
<includeonly>{{#if:{{{wikitable|}}}|{{{!}} class="wikitable {{#if:{{{dk|}}}|dk}}" style="width:100%; text-align:center"}}
{{!}}-
{{!}}-
!width=12%| {{{imagelabel|Image}}}
! width="12%" | {{{imagelabel|Image}}}
!width=10%| Name
! width="10%" | Name
!{{{descriptionlabel|Description}}}
! {{{descriptionlabel|Description}}}
{{#forargs:name|key|value|<nowiki/>
{{#forargs:name|key|value|<nowiki/>
{{!}}-
{{!}}-
{{!}} {{{image{{#var:key}}|}}} {{!}}{{!}} {{#var:value}} {{!}}{{!}} style="text-align:left"{{!}}{{{description{{#var:key}}|}}}
{{!}} {{{image{{#var:key}}|}}} {{!}}{{!}} {{#var:value}} {{!}}{{!}} style="text-align:left" {{!}} {{{description{{#var:key}}|}}}
}}
}}
{{#ifeq:{{{wikitable}}}|y|{{!}}}|}}</includeonly><noinclude>This template establishes a consistent format for displaying a list of subjects on a game page and their respective descriptions. If you also want to list where something appears first and last, see {{tem|content appearances}}.
{{#if:{{{wikitable|}}}|{{!}}}|}}</includeonly><noinclude>
This template establishes a consistent format for displaying a list of subjects on a game page and their respective descriptions. If you also want to list where something appears first and last, see {{tem|content appearances}}.


== Usage ==
== Usage ==
Line 23: Line 24:
This works for any amount of numbered <code>image</code>/<code>name</code>/<code>description</code> parameters.
This works for any amount of numbered <code>image</code>/<code>name</code>/<code>description</code> parameters.


Additionally, if the value of <code>dk</code> is set to <code>y</code>, then the <code>dktable-brown</code> class is used instead of the standard wikitable. Granted, <code>wikitable</code> must be set to <code>y</code> to use this as a standalone wikitable rather than as rows within a wikitable.
Additionally, if the value of <code>dk</code> is set to <code>y</code>, then the <code>dk</code> class is applied to the wikitable. Granted, <code>wikitable</code> must be set to <code>y</code> to use this as a standalone wikitable rather than as rows within a wikitable.


[[Category:Content templates]]</noinclude>
[[Category:Content templates]]</noinclude>

Revision as of 14:15, February 3, 2024

This template establishes a consistent format for displaying a list of subjects on a game page and their respective descriptions. If you also want to list where something appears first and last, see {{content appearances}}.

Usage

The syntax is as follows:

{{content description
|image1=
|name1=
|description1=
}}

This works for any amount of numbered image/name/description parameters.

Additionally, if the value of dk is set to y, then the dk class is applied to the wikitable. Granted, wikitable must be set to y to use this as a standalone wikitable rather than as rows within a wikitable.