Free
Download the package from the manager of your site.
How to download?
How to download?
numabbr — modifier for shortening large numbers in the format 1K, 1.5K, etc.
It is convenient to use for example for formatted output of views.
If you call the modifier via Fenom, then a fast Fenom modifier will be used.
If pdoTools is not installed or the usual MODX syntax is used, the modifier will be called from the snippet.
{$views|numabbr} — call via fenom-modifier
[[+views:numabbr]] — call using the MODX syntax (using the snippet modifier)
{1000 | numabbr} — Displays 1K
{1229 | numabbr} — Displays 1.2K
{1500 | numabbr} — Displays 1.5K
{154000 | numabbr} — will output 154K
{1000000 | numabbr} — Displays 1M
{1500000 | numabbr} — Displays 1.5M
It is convenient to use for example for formatted output of views.
If you call the modifier via Fenom, then a fast Fenom modifier will be used.
If pdoTools is not installed or the usual MODX syntax is used, the modifier will be called from the snippet.
Usage Examples
{$views|numabbr} — call via fenom-modifier
[[+views:numabbr]] — call using the MODX syntax (using the snippet modifier)
Other examples
{111 | numabbr} — will display 111{1000 | numabbr} — Displays 1K
{1229 | numabbr} — Displays 1.2K
{1500 | numabbr} — Displays 1.5K
{154000 | numabbr} — will output 154K
{1000000 | numabbr} — Displays 1M
{1500000 | numabbr} — Displays 1.5M
NumberAbbreviation 1.0.1-beta
- The code is moved to a class file
NumberAbbreviation 1.0.0-beta
- First release