NumberAbbreviation

Modifier for shortening large numbers in 1.2K format
Free
Download the package from the manager of your site.
How to download?
Packages
3
Downloads
180
Автор дополнения
Packages
3
Downloads
180
Version 1.0.1-beta
Release date 01.23.2018
Downloads 34
Views 1 578
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.

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