Template:NoCoins/doc

This is the current revision of this page, as edited by Alex (talk | contribs) at 23:57, 12 October 2024 (Created page with "{{Documentation}} {{Invokes|Currency}} The '''NoCoins''' template colours a number that represents an amount of coins. It is designed for use in the body text of articles, as opposed to {{T|Coins}}, which displays an icon that disrupts line-height and should only be used in wikitables. The amount is formatted with a comma (if the value is greater than 1,000), rounded to 2 decimals (if the value has three or more decimal places), and uses the following colours: * <span..."). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This is a documentation subpage for Template:NoCoins.
It contains usage information, categories, and other content that is not part of the original template page.
Template:NoCoins invokes function nocoins in Module:Currency using Lua.
Template:NoCoins invokes Module:Currency using Lua.

The NoCoins template colours a number that represents an amount of coins. It is designed for use in the body text of articles, as opposed to {{Coins}}, which displays an icon that disrupts line-height and should only be used in wikitables.

The amount is formatted with a comma (if the value is greater than 1,000), rounded to 2 decimals (if the value has three or more decimal places), and uses the following colours:

  • Blue - positive numbers
  • Green - if the number is zero
  • Red - negative numbers

Usage

{{NoCoins|number of coins|optional}}

The second unnamed parameter is optional. When filled in, it appends the word "coins" in the same colour.

Examples

{{NoCoins|245.58639}} produces the following result: 245.59

{{NoCoins|0}} produces the following result: 0

{{NoCoins|-3000|c}} produces the following result: −3,000 coins

Parameters

Template parameters

ParameterDescriptionTypeStatus
Coins1

Amount of coins.

Numberrequired
Add suffix2

If set, adds a ' coins' suffix.

Stringoptional