Template:Chip container: Difference between revisions
IssuePress (talk | contribs) No edit summary |
IssuePress (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<includeonly><div class="chip-container">{{#if:{{{title|}}}|<h2 class="chip-container-label">{{{title}}}</h2>}}<div class="chips">{{#arraymaptemplate:{{{1|}}}|{{{template}}}|,|}}</div></div> | <includeonly><div class="chip-container">{{#if:{{{title|}}}|<h2 class="chip-container-label">{{{title}}}</h2>}}<div class="chips">{{#arraymaptemplate:{{{1|}}}|{{{template}}}|,|}}</div></div> | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
The Chip container template is an optional wrapper for chip templates, designed to group multiple chips together within a styled container. | The '''Chip container''' template is an optional wrapper for chip templates, designed to group multiple chips together within a styled container. | ||
==Usage== | ==Usage== | ||
Line 20: | Line 20: | ||
**From a comma-separated array. | **From a comma-separated array. | ||
* <code>template</code> (required): A valid sub-template to format the chips. Accepted values include: | * <code>template</code> (required): A valid sub-template to format the chips. Accepted values include: | ||
**<code>Ink chip</code> | **<code>[[:template:Ink chip | Ink chip]]</code> | ||
**<code>Machine chip</code> | **<code>[[:template:Machine chip | Machine chip]]</code> | ||
**<code>Brand chip</code> | **<code>[[:template:Brand chip | Brand chip]]</code> | ||
* <code>title</code> (optional): A title for the container, displayed as a header. If omitted, no header will appear, but the chips will still be rendered.</noinclude> | * <code>title</code> (optional): A title for the container, displayed as a header. If omitted, no header will appear, but the chips will still be rendered.</noinclude> |
Revision as of 02:40, 12 December 2024
The Chip container template is an optional wrapper for chip templates, designed to group multiple chips together within a styled container.
Usage
Use this template to organize multiple chips with a common theme or title. Each chip is rendered using a specified sub-template, and the list of items is processed in sequence.
Syntax
Ink chips
{{Chip container|Yellow, Cornflower, Burgundy, Medium Blue, Fluorescent Pink|template=Ink chip|title=Chip Container}}
Chip Container
{{Chip container|{{#ask:[[Category:Riso compatible inks]]|format=plainlist|headers=hide|link=none|limit=100}}|template=Ink chip|title=Riso Compatible Inks}}
Riso Compatible Inks
Machine chips
{{Chip container|GR2700, GR3750, GR3770|template=Machine chip}}
Parameters
{{Chip container|<items>|template=<sub-template>|title=<container title>}}
1
(required): A comma-separated list of items to display as chips. You can provide these items:- Directly, e.g.,
Yellow, Cornflower, Burgundy
- From a comma-separated array.
- Directly, e.g.,
template
(required): A valid sub-template to format the chips. Accepted values include:title
(optional): A title for the container, displayed as a header. If omitted, no header will appear, but the chips will still be rendered.