Module:Emotes/doc
This is the documentation page for Module:Emotes
Module:Emotes
Renders a sortable wikitable of emotes defined in Module:Emotes/data with translatable display strings from MessageBundle:Emotes and other relevant MessageBundles.
This module provides the following function(s):
list- renders all emotes, or a subset filtered by source, as a wikitable inside a collapsible section.
Usage
List all emotes
By default, all emotes are shown, sorted by display name.
{{#invoke:Emotes|list}}
Filter by source
A source name can be provided to show only emotes matching that source. The Source column is omitted from the output, since it would be redundant once filtered.
{{#invoke:Emotes|list|Lost Harvest}}
Emotes that are available by default (default in the dataset) are filtered the same way:
{{#invoke:Emotes|list|Default}}
The filter value is slugified before matching, so it does not need to exactly match the casing/formatting used in Module:Emotes/data.
Set heading level
By default, the section heading renders as h3. To override this, pass a value to the heading parameter.
{{#invoke:Emotes|list|heading=2}}
Render expanded
The section may auto-collapse depending on the number of items listed. To force the section expanded regardless of count, pass a truthy value to the expanded parameter.
{{#invoke:Emotes|list|expanded=yes}}
Render without the collapsible wrapper
To output the bare content with no heading, count marker, or collapsible section, pass a truthy value to the bare parameter.
{{#invoke:Emotes|list|bare=yes}}
Parameters
list
- 1 (optional)
- string
- Source name to filter by. Slugified before matching against the
sourcetoken's slug half in Module:Emotes/data. - Returns an error message if no emotes match.
- heading (optional)
- integer
- Heading level for the generated heading. Defaults to
3, i.e.h3. - Must be an integer between
1and6. Invalid or out-of-range values fall back to the default.
- expanded (optional)
- boolean
- If specified with a truthy value, output will be expanded by default.
- Valid values:
trueyes1
- bare (optional)
- boolean
- If specified with a truthy value, returns only the content, with no heading, count marker, or collapsible wrapper.
Notes
list
- Display strings are resolved via MessageBundle:Emotes using the page's current language, keyed by each emote's
id(as<ID>-nameand<ID>-description). - All column headers and section titles resolve via MessageBundle:Labels.
- Source values are rendered as wikilinks to their English-titled page, except
default, which is shown as plain text since it has no corresponding page. - Output is wrapped in a shared collapsible section (see
newCollapsibleSection()in Module:Common). A count marker (Total: <INTEGER>) appears between the heading and the content and stays visible regardless of collapse state. The section auto-collapses by default once the item count exceeds 6; passexpanded=yesto override.