Template:Multi-column list

From Terraria Mods Wiki
(Redirected from Template:Mclist)
Jump to navigation Jump to search
Template-info.svg Documentation The documentation below is transcluded from Template:Multi-column list/doc. (edit | history)

create a responsive multi-column list. Acceptable shortcut: {{mclist}}.

Usage

Parameters:

  • All Unamed parameters: contents of every list item.
  • optional width: item width, accept any css width, default is 10em.
  • optional columns: Can be width value (will override width parameter) or column count.
  • optional gap: value for css column-gap attribute.
  • optional rule: value for css column-rule attribute.
  • optional class: css class(es).
  • optional id: id attribute.
  • optional css or style: custom css rules applied to list items.
  • optional boxcss or boxstyle: custom css rules applied to wrapper box.

Example

{{mclist
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
}}

will result:

{{mclist|width=30em
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
}}

will result:

{{mclist|width=15em|boxcss=line-height: 3
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
}}

will result:

{{mclist|width=15em|css=border-bottom: 1px solid #808080;|boxcss=border: 2px solid green; padding: 1em;
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
|{{item|Handgun}}
|{{item|bunny}}
|{{item|butterfly}}
|{{item|Flamarang}}
|{{item|Handgun}}
|{{item|Hellstone Bar}}
|{{item|Fiery Greatsword}}
}}

will result:


There is another API style, it's more easier to use with DPL/cargo:

{{mclist/start|width=20em}}
{{mclist/item|{{item|Handgun}} }}
{{mclist/item|{{item|bunny}} }}
{{mclist/item|{{item|butterfly}} }}
{{mclist/item|{{item|Flamarang}} }}
{{mclist/item|{{item|Handgun}} }}
{{mclist/item|{{item|Hellstone Bar}} }}
{{mclist/item|{{item|Fiery Greatsword}} }}
{{mclist/item|{{item|Handgun}} }}
{{mclist/item|{{item|bunny}} }}
{{mclist/item|{{item|butterfly}} }}
{{mclist/item|{{item|Flamarang}} }}
{{mclist/item|{{item|Handgun}} }}
{{mclist/item|{{item|Hellstone Bar}} }}
{{mclist/item|{{item|Fiery Greatsword}} }}
{{mclist/item|{{item|Handgun}} }}
{{mclist/item|{{item|bunny}} }}
{{mclist/item|{{item|butterfly}} }}
{{mclist/item|{{item|Flamarang}} }}
{{mclist/item|{{item|Handgun}} }}
{{mclist/item|{{item|Hellstone Bar}} }}
{{mclist/item|{{item|Fiery Greatsword}} }}
{{mclist/item|{{item|Handgun}} }}
{{mclist/item|{{item|bunny}} }}
{{mclist/item|{{item|butterfly}} }}
{{mclist/item|{{item|Flamarang}} }}
{{mclist/end}}

will result:

All parameters of {{mclist}} are available on {{mclist/start}}, and every list item can also define their own css:

{{mclist/start|width=20em}}
{{mclist/item|{{item|Handgun}}|css=border:1px solid blue}}
{{mclist/item|{{item|bunny}} }}
{{mclist/item|{{item|butterfly}} }}
{{mclist/item|{{item|Flamarang}} }}
{{mclist/item|{{item|Handgun}} }}
{{mclist/item|{{item|Hellstone Bar}} }}
{{mclist/item|{{item|Fiery Greatsword}}|css=border:2px dotted blue}}
{{mclist/item|{{item|Handgun}}|css=border:1px dotted green}}
{{mclist/item|{{item|bunny}} }}
{{mclist/item|{{item|butterfly}} }}
{{mclist/item|{{item|Flamarang}} }}
{{mclist/item|{{item|Handgun}} }}
{{mclist/item|{{item|Hellstone Bar}}|css=border:2px solid yellow}}
{{mclist/item|{{item|Fiery Greatsword}} }}
{{mclist/end}}

will result:

Options

This template supports options through {{options}} template. All valid options are listed below, see {{options}} for usage and other infomation.

See Template:mclist/initOptions for the initial options setting of this template.

NameAliasInitial ValueValue Mapping[1]Note
type(empty)
gap(empty)
rule(empty)
widthcolumns
(empty)
class(empty)
cssstyle
(empty)
boxcssboxstyle
(empty)
  1. Values with mapping will be stored and loaded as mapped value. Other values without mapping will be stored and loaded as-is.

See also